File size: 659 Bytes
0702eb8
 
 
b4297ca
0702eb8
b4297ca
 
 
 
 
 
 
 
 
 
0702eb8
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import NextAuth from 'next-auth'

declare module 'next-auth' {
    // Returned by `useSession`, `getSession` and received as a prop on the `SessionProvider` React Context
    interface Session {
        // A JWT which can be used as Authorization header with supabase-js for RLS.
        supabaseAccessToken?: string
        jwt?: string
        id?: string
        user: {
            id: string
            email: string
            name: string
            image: string
        } & DefaultSession["user"]
    }
}

declare module 'next-auth/jwt' {
    interface JWT {
        id_token?: string
        provider?: string
        accessToken?: string
    }
}