-
Notifications
You must be signed in to change notification settings - Fork 0
/
next-auth.d.ts
27 lines (26 loc) · 891 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
import { DefaultSession, DefaultUser } from 'next-auth'
import { JWT as JWTOriginal } from 'next-auth/jwt'
declare module "next-auth" {
interface Session {
user: {
level: string,
role: string,
// eventualmente altri pezzi derivati dall'access_token
// dipendentemente dal tipo di applicazione (tipo sx.pr, sx.uf, sx.co ecc)
} & DefaultSession['user'],
//accessToken: Record<string, any>,
//idToken: string,
}
// interface User extends DefaultUser {
// role: string
// }
}
declare module "next-auth/jwt" {
/** Returned by the `jwt` callback and `getToken`, when using JWT sessions */
interface JWT extends JWTOriginal {
/** OpenID ID Token and Access Token */
idToken?: string
accessToken?: Record<string, any>
accessTokenOriginal?: string
}
}