Skip to content

Commit

Permalink
adjust auth errors
Browse files Browse the repository at this point in the history
  • Loading branch information
elie222 committed Jan 1, 2025
1 parent 3228d2f commit 923a4b9
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions apps/web/utils/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ export const SCOPES = [
: []),
];

export const getAuthOptions: (options?: {
consent: boolean;
}) => NextAuthConfig = (options) => ({
const getAuthOptions: (options?: { consent: boolean }) => NextAuthConfig = (
options,
) => ({
// debug: true,
providers: [
GoogleProvider({
Expand Down Expand Up @@ -187,7 +187,7 @@ const refreshAccessToken = async (token: JWT): Promise<JWT> => {
});
return {
...token,
error: "RefreshAccessTokenError",
error: "RequiresReconsent",
};
}

Expand Down Expand Up @@ -305,6 +305,9 @@ declare module "@auth/core/jwt" {
access_token?: string;
expires_at?: number;
refresh_token?: string;
error?: "RefreshAccessTokenError" | "MissingAccountError";
error?:
| "RefreshAccessTokenError"
| "MissingAccountError"
| "RequiresReconsent";
}
}

1 comment on commit 923a4b9

@vercel
Copy link

@vercel vercel bot commented on 923a4b9 Jan 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.