-
Notifications
You must be signed in to change notification settings - Fork 3
/
next-auth.d.ts
38 lines (35 loc) · 868 Bytes
/
next-auth.d.ts
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
26
27
28
29
30
31
32
33
34
35
36
37
38
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 {
refreshTokenExpires?: number;
accessTokenExpires?: string;
refreshToken?: string;
token?: string;
error?: string;
user?: User & Session['user'];
}
interface User {
firstName?: string | null;
lastName?: string | null;
username?: string;
email?: string | null;
id?: string;
access_token?: string;
}
}
declare module 'next-auth/jwt' {
/** Returned by the `jwt` callback and `getToken`, when using JWT sessions */
interface JWT {
refreshTokenExpires?: number;
accessTokenExpires?: number;
refreshToken?: string;
token: string;
exp?: number;
iat?: number;
jti?: string;
}
}