How to sign-out on nextjs server side? #3670
Unanswered
ivanvinicius
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to sign-in only users who have payload.metadata.permission = true, so I verify it on middleware. If user does not have access, I redirect to api/sign-out route handler.
Code below
After the code runs application go back to sign-in page automatically but, when I try to sign-in again I get a loop of erros saying:
What I shoud to change in my logic or code?
Beta Was this translation helpful? Give feedback.
All reactions