Django all-auth: How to disable automatic login via Google

Viewed 495

I'm using the django-allauth package to log in users to my Django app via the Google API.

My problem is that when a user successfully logs in via the external Google log in page, then everytime he logs out and wants to log in again, django-allauth automatically logs him in without redirecting him to the Google sign in page.

How can I disable this functionality, and instead have the user redirect to the Google log in page each time he wants to sign in? (Ι have already tried ACCOUNT_SESSION_REMEMBER = False).

Thanks!

1 Answers

It seems like what's happening there is that the OAuth2 flow is working as intended. Since the user has granted the application access to whichever data in Google your app is requesting, and that grant is still valid when Google gets the next login request, so Google doesn't make the user fill out another grant form.

Could you say more about your use case? Are you trying to set it up so the user can sign in with a different Google account?

Related