diff --git a/src/handlers/callback.ts b/src/handlers/callback.ts index 38bb45b86..5dbd5969a 100644 --- a/src/handlers/callback.ts +++ b/src/handlers/callback.ts @@ -57,6 +57,8 @@ import { HandlerError } from '../utils/errors'; * }); * ``` * + * @throws {@Link HandlerError} + * * @category Server */ export type AfterCallback = ( @@ -95,6 +97,8 @@ export interface CallbackOptions { /** * The handler for the `api/auth/callback` route. * + * @throws {@Link HandlerError} + * * @category Server */ export type HandleCallback = (req: NextApiRequest, res: NextApiResponse, options?: CallbackOptions) => Promise; diff --git a/src/handlers/login.ts b/src/handlers/login.ts index cb0e0d339..ed24eeb01 100644 --- a/src/handlers/login.ts +++ b/src/handlers/login.ts @@ -108,6 +108,8 @@ export interface LoginOptions { /** * The handler for the `api/auth/login` route. * + * @throws {@Link HandlerError} + * * @category Server */ export type HandleLogin = (req: NextApiRequest, res: NextApiResponse, options?: LoginOptions) => Promise; diff --git a/src/handlers/logout.ts b/src/handlers/logout.ts index 1940f0e0c..3128c76f2 100644 --- a/src/handlers/logout.ts +++ b/src/handlers/logout.ts @@ -19,6 +19,8 @@ export interface LogoutOptions { /** * The handler for the `api/auth/logout` route. * + * @throws {@Link HandlerError} + * * @category Server */ export type HandleLogout = (req: NextApiRequest, res: NextApiResponse, options?: LogoutOptions) => Promise; diff --git a/src/handlers/profile.ts b/src/handlers/profile.ts index 6c42018e5..73e1c90a8 100644 --- a/src/handlers/profile.ts +++ b/src/handlers/profile.ts @@ -27,6 +27,8 @@ export type ProfileOptions = { /** * The handler for the `/api/auth/me` route. * + * @throws {@Link HandlerError} + * * @category Server */ export type HandleProfile = (req: NextApiRequest, res: NextApiResponse, options?: ProfileOptions) => Promise; diff --git a/src/index.ts b/src/index.ts index 8dfbe1c11..baf7731ee 100644 --- a/src/index.ts +++ b/src/index.ts @@ -115,6 +115,8 @@ export { WithPageAuthRequiredProps } from './frontend'; +export { AccessTokenError, HandlerError } from './utils/errors'; + export { ConfigParameters, HandleAuth, diff --git a/src/session/get-access-token.ts b/src/session/get-access-token.ts index 05d2062c1..174909455 100644 --- a/src/session/get-access-token.ts +++ b/src/session/get-access-token.ts @@ -74,6 +74,8 @@ export interface GetAccessTokenResult { /** * Get an Access Token to access an external API. * + * @throws {@Link AccessTokenError} + * * @category Server */ export type GetAccessToken = (