juanifioren / django-oidc-provider

OpenID Connect and OAuth2 provider implementation for Djangonauts.
http://django-oidc-provider.readthedocs.org
MIT License
416 stars 239 forks source link

Infinite redirect loop with prompt=select_account #388

Open stefanfoulis opened 3 years ago

stefanfoulis commented 3 years ago

related to https://github.com/juanifioren/django-oidc-provider/issues/187

The only difference between prompt=login and prompt=select_account seems to be that with prompt=login the prompt GET parameter is removed from next_page before redirecting to the login page. It looks like because it is not removed with prompt=select_account we end up with an infinite loop.

Probably we should just make prompt=select_acconunt behave the same as prompt=login.

To properly support prompt=select_account in the future, we'd probably need to provide some sort of hook so that developers can add logic to handle this special case correctly on the login page 🤔 . Perhaps pass the prompt=select_account GET parameter to the login page itself, instead of in next_page.