/
githubmirror
/
Open-Assistant
Обзор
Документация
Войти
/
githubmirror
/
Open-Assistant
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
website/types/next-auth.d.ts
34 строки
789 B
notmd
Create backend user when generate jwt (#2702)
19 апр 2023, 19:25
Не верифицирован
19 апр 2023, 19:25
b4fea53
Код
Авторство
О чём код?
import { DefaultSession } from "next-auth"; declare module "next-auth" { interface Session { user: { /** The user's role. */ role: string; /** True when the user is new. */ isNew: boolean; /** Iso timestamp of the user's acceptance of the terms of service */ tosAcceptanceDate?: string; } & DefaultSession["user"]; inference: { isAuthenticated: boolean; }; } } declare module "next-auth/jwt" { interface JWT { /** The user's role. */ role: string; /** True when the user is new. */ isNew?: boolean; sub: string; /** id of user in the data backend */ backendUserId?: string; /** Iso timestamp of the user's acceptance of the terms of service */ tosAcceptanceDate: string | null; } }