feat(WEB-215): add refresh_token
This commit is contained in:
committed by
Michael Zetterberg
parent
68f1e87169
commit
c4912bbb94
@@ -42,6 +42,11 @@ export const middleware = auth(async (request) => {
|
||||
const lang = findLang(nextUrl.pathname)!
|
||||
|
||||
const isLoggedIn = !!request.auth
|
||||
const hasError = request.auth?.error
|
||||
|
||||
if (hasError) {
|
||||
throw internalServerError(request.auth?.error)
|
||||
}
|
||||
|
||||
if (isLoggedIn) {
|
||||
const headers = new Headers(request.headers)
|
||||
|
||||
Reference in New Issue
Block a user