@@ -37,7 +37,6 @@ import { createStorage } from "unstorage"
3737import memoryDriver from "unstorage/drivers/memory"
3838import vercelKVDriver from "unstorage/drivers/vercel-kv"
3939import { UnstorageAdapter } from "@auth/unstorage-adapter"
40- import type { NextAuthConfig } from "next-auth"
4140
4241const storage = createStorage ( {
4342 driver : process . env . VERCEL
@@ -49,11 +48,12 @@ const storage = createStorage({
4948 : memoryDriver ( ) ,
5049} )
5150
52- const config = {
51+ export const { handlers, auth, signIn, signOut } = NextAuth ( {
52+ debug : ! ! process . env . AUTH_DEBUG ,
5353 theme : { logo : "https://authjs.dev/img/logo-sm.png" } ,
5454 adapter : UnstorageAdapter ( storage ) ,
5555 providers : [
56- Apple ( { redirectProxyUrl : "" } ) ,
56+ Apple ,
5757 // Atlassian,
5858 Auth0 ,
5959 AzureB2C ,
@@ -97,9 +97,7 @@ const config = {
9797 Vipps ( {
9898 issuer : "https://apitest.vipps.no/access-management-1.0/access/" ,
9999 } ) ,
100- WorkOS ( {
101- connection : process . env . AUTH_WORKOS_CONNECTION ! ,
102- } ) ,
100+ WorkOS ( { connection : process . env . AUTH_WORKOS_CONNECTION ! } ) ,
103101 Zoom ,
104102 ] ,
105103 basePath : "/auth" ,
@@ -118,19 +116,13 @@ const config = {
118116 return token
119117 } ,
120118 async session ( { session, token } ) {
121- if ( token ?. accessToken ) {
122- session . accessToken = token . accessToken
123- }
119+ if ( token ?. accessToken ) session . accessToken = token . accessToken
120+
124121 return session
125122 } ,
126123 } ,
127- experimental : {
128- enableWebAuthn : true ,
129- } ,
130- debug : process . env . NODE_ENV !== "production" ? true : false ,
131- } satisfies NextAuthConfig
132-
133- export const { handlers, auth, signIn, signOut } = NextAuth ( config )
124+ experimental : { enableWebAuthn : true } ,
125+ } )
134126
135127declare module "next-auth" {
136128 interface Session {
0 commit comments