Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.13 throws away oidc nonce provided by the application #180

Closed
ThiefMaster opened this issue Jan 14, 2020 · 1 comment
Closed

0.13 throws away oidc nonce provided by the application #180

ThiefMaster opened this issue Jan 14, 2020 · 1 comment
Assignees
Labels
bug

Comments

@ThiefMaster
Copy link

@ThiefMaster ThiefMaster commented Jan 14, 2020

See this snippet here:

if scope and scope.startswith('openid'):
# this is an OpenID Connect service
nonce = generate_token(20)
kwargs['nonce'] = nonce
rv['nonce'] = nonce

This is called from RemoteApp.create_authorization_url which is called by RemoteApp.authorize_redirect which is called by my application (I'm not using the registry).

So if I pass my own nonce (which I'm storing in the session myself) it gets overwritten, so when I try to parse the id token later it fails of course. I fixed it in my app like this but it feels extremely ugly.

So it would be nice if:

  • no new nonce was generated if the caller already provided one
  • there was an api to access the session data without popping it and without using internal apis (_get_session_data); using retrieve_access_token_params just to get the nonce would be pretty inappropriate since it does much more
  • there was a proper OIDC client built-in in addition to the standard OAuth2 client ;)
@ThiefMaster ThiefMaster added the bug label Jan 14, 2020
lepture added a commit that referenced this issue Feb 11, 2020
@lepture

This comment has been minimized.

Copy link
Owner

@lepture lepture commented Feb 11, 2020

Fixed in v0.14

@lepture lepture closed this Feb 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.