Merged in fix/remove-session-on-sas-refresh-error (pull request #3204)

fix(sas auth): remove session when we get a RefreshAccessTokenError

* fix(sas auth): remove session when we get a RefreshAccessTokenError


Approved-by: Linus Flood
This commit is contained in:
Joakim Jäderberg
2025-11-24 07:35:58 +00:00
parent dd9ffecb02
commit aa007afedf
3 changed files with 20 additions and 2 deletions

View File

@@ -0,0 +1,12 @@
"use client"
import { signOut, useSession } from "next-auth/react"
export function SessionRefresher() {
const session = useSession()
if (session.data?.error === "RefreshAccessTokenError") {
signOut({ redirect: false })
}
return null
}