Next.js Discord

Discord Forum

Clean Signout in Next-Auth.js

Answered
redbabinks posted this in #help-forum
Open in Discord
Hey, I am currently coding my first app and something bothers me ever since I started.
When my user signs out, the client session is removed (so it is no longer connected) but on login back it picks up the last session from I don’t know where and this is not the behaviour I’d like to have.
What I want is whenever the user decides to Login no matter if he was connected on the app earlier, let him decide which account to take. I am using Google Provider.
Answered by redbabinks
Ok I found the solution in the Google Provider docs, you have to update the authorization object in the google provider object to force Google Reissue a token on signin everytime
View full answer

1 Reply

Ok I found the solution in the Google Provider docs, you have to update the authorization object in the google provider object to force Google Reissue a token on signin everytime
Answer