You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a client doesn't request a redirect_uri in an authorization request, oauthlib calls get_default_redirect_uri, and passes this to save_authorization_code. So far, so good.
However, when the redirect is performed, confirm_redirect_uri is called with None as redirect_uri. This doesn't match the redirect_uri saved earlier. Is this intended behavior? It felt wrong for me to have to check for None myself, and repeat getting the default URI from the client datastruct again.
The text was updated successfully, but these errors were encountered:
redirect_uri management in oauthlib for authorization code is as below:
Browser's request response_type=code:
See RFC's section:
redirect_uri
OPTIONAL
Implementation (pseudo code):
if redirect_uri in request:
validate_redirect_uri(request.redirect_uri)
else
get_default_redirect_uri()
Client's request grant_type=authorization_code:
See RFC's section:
redirect_uri
REQUIRED, if the "redirect_uri" parameter was included in the
authorization request as described in Section 4.1.1, and their
values MUST be identical.
Current implementation (oauthlib 2.x)
if redirect_uri in request:
confirm_redirect_uri(request.redirect_uri)
else
confirm_redirect_uri(None)
Proposed implementation (oauthlib 3.x)
if redirect_uri in request:
confirm_redirect_uri(request.redirect_uri)
else
confirm_redirect_uri(get_default_redirect_uri())
What do you think ? It will call get_default_redirect_uri() also in the grant_type=authorization_code request, but it doesn't break the RFC because at the end, the implementation will verify that their values MUST be identical.
When a client doesn't request a
redirect_uri
in an authorization request,oauthlib
callsget_default_redirect_uri
, and passes this tosave_authorization_code
. So far, so good.However, when the redirect is performed,
confirm_redirect_uri
is called withNone
asredirect_uri
. This doesn't match theredirect_uri
saved earlier. Is this intended behavior? It felt wrong for me to have to check forNone
myself, and repeat getting the default URI from the client datastruct again.The text was updated successfully, but these errors were encountered: