REST API call to /api/auth/signout not working #1797
Unanswered
yashvijaju
asked this question in
Help
Replies: 0 comments
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.
Uh oh!
There was an error while loading. Please reload this page.
-
hey, I am using Next Auth with Azure Active Directory, and thus need to use the /api/auth/signout api to clear session data (using SignOut() doesn't sign me out of Azure).
When I click signOut, the following onClick function is fired :
onClick={() => {signOutLocal().then(window.location.assign("https://login.microsoftonline.com/common/oauth2/v2.0/logout"))}}
The signOutLocal is as follows:
The API is returning 200, so i'd assume it works. However, the session data is not being cleared. When I head to /api/auth/session, I can see all the session data. How can I fix this?
Update :
Changed signOutLocal to as follows. Currently works on LocalHost but not live website.
Currently works on LocalHost but not live website. Any thoughts on how I could fix this?
Beta Was this translation helpful? Give feedback.
All reactions