diff --git a/packages/auth-core/src/consts.ts b/packages/auth-core/src/consts.ts index 2a847e58c..335b25f4c 100644 --- a/packages/auth-core/src/consts.ts +++ b/packages/auth-core/src/consts.ts @@ -3,8 +3,10 @@ export const builtinOAuthProviderNames = [ "builtin::oauth_apple", "builtin::oauth_azure", + "builtin::oauth_discord", "builtin::oauth_github", "builtin::oauth_google", + "builtin::oauth_slack", ] as const; export type BuiltinOAuthProviderNames = (typeof builtinOAuthProviderNames)[number]; diff --git a/packages/auth-nextjs/src/app/index.ts b/packages/auth-nextjs/src/app/index.ts index a39bf23cd..383d837a7 100644 --- a/packages/auth-nextjs/src/app/index.ts +++ b/packages/auth-nextjs/src/app/index.ts @@ -25,7 +25,7 @@ export class NextAppAuth extends NextAuth { () => new NextAuthSession( this.client, - cookies().get(this.options.authCookieName)?.value.split(";")[0] + cookies().get(this.options.authCookieName)?.value.split(";")[0] ?? null ) ); diff --git a/packages/auth-nextjs/src/pages/server.ts b/packages/auth-nextjs/src/pages/server.ts index 79550ca8c..5b7924bc8 100644 --- a/packages/auth-nextjs/src/pages/server.ts +++ b/packages/auth-nextjs/src/pages/server.ts @@ -35,7 +35,7 @@ export class NextPagesAuth extends NextAuth { sessionCache.get(req) ?? new NextAuthSession( this.client, - req.cookies[this.options.authCookieName]?.split(";")[0] + req.cookies[this.options.authCookieName]?.split(";")[0] ?? null ); sessionCache.set(req, session); return session; diff --git a/packages/auth-nextjs/src/shared.ts b/packages/auth-nextjs/src/shared.ts index 6361e03e8..ffcaa7480 100644 --- a/packages/auth-nextjs/src/shared.ts +++ b/packages/auth-nextjs/src/shared.ts @@ -519,7 +519,7 @@ export class NextAuthSession { public readonly client: Client; /** @internal */ - constructor(client: Client, private readonly authToken: string | undefined) { + constructor(client: Client, public readonly authToken: string | null) { this.client = this.authToken ? client.withGlobals({ "ext::auth::client_token": this.authToken }) : client;