lepture / authlib

The ultimate Python library in building OAuth, OpenID Connect clients and servers. JWS,JWE,JWK,JWA,JWT included.
https://authlib.org/
BSD 3-Clause "New" or "Revised" License
4.39k stars 436 forks source link

fix: OIDC "login" prompt should be "login" even if user authenticated #637

Open frankie567 opened 3 months ago

frankie567 commented 3 months ago

What kind of change does this PR introduce? (check at least one)



OpenID Connect specification states the following about the prompt=login parameter:

The Authorization Server SHOULD prompt the End-User for reauthentication. If it cannot reauthenticate the End-User, it MUST return an error, typically login_required.

Ref: https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest

In the current implementation, if end_user is present, the login prompt is ignored and set to None. We should instead keep this prompt so the end-developer can force a re-authentication of the user.