feat(WEB-215): add refresh_token

This commit is contained in:
Simon Emanuelsson
2024-04-24 12:37:47 +02:00
committed by Michael Zetterberg
parent 68f1e87169
commit c4912bbb94
10 changed files with 175 additions and 21 deletions

8
types/jwt.d.ts vendored
View File

@@ -1,8 +1,14 @@
import type { DefaultJWT } from "next-auth/jwt"
import type { RefreshTokenError } from "./authError"
// Module augmentation
// https://authjs.dev/getting-started/typescript#popular-interfaces-to-augment
declare module "next-auth/jwt" {
/** Returned by the `jwt` callback and `auth`, when using JWT sessions */
interface JWT {
interface JWT extends DefaultJWT, RefreshTokenError {
access_token: string
expires_at: number
refresh_token: string
}
}