Merged in feature/refresh-token (pull request #401)
feat: SW-101 Proactively refresh tokens Approved-by: Michael Zetterberg
This commit is contained in:
@@ -33,7 +33,7 @@ import type {
|
||||
async function getVerifiedUser({ session }: { session: Session }) {
|
||||
const now = Date.now()
|
||||
|
||||
if (session.token.expires_at < now) {
|
||||
if (session.token.expires_at && session.token.expires_at < now) {
|
||||
return { error: true, cause: "token_expired" } as const
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user