How to sign-out on nextjs server side? #3670
Replies: 1 comment 1 reply
-
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
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