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

fix: Exception when id_token not set. #1208

Merged
merged 1 commit into from
Oct 18, 2023

Conversation

dopry
Copy link
Contributor

@dopry dopry commented Oct 16, 2023

django-oauth-toolkit does not support openid for the resource owner credentials flow. The response will still have openid in the scopes property, but there is not id_token This leads to an exception.

This change makes the client a little more tolerant of auth servers by not trying to parse the id_token in this scenario.

fixes #1206

Checklist

  • [N/A] This PR makes changes to the public API
  • [*] I have included links for closing relevant issue numbers

django-oauth-toolkit does not support openid for the resource owner
credentials flow. The response will still have openid in the scopes
property, but there is not id_token This leads to an exception.

This change makes the client a little more tolerant of auth
servers by not trying to parse the id_token in this scenario.

authts#1206
@dopry
Copy link
Contributor Author

dopry commented Oct 17, 2023

@pamapa let me know if you need any thing else on this PR.

@pamapa pamapa merged commit 5454e0f into authts:main Oct 18, 2023
2 checks passed
@pamapa
Copy link
Member

pamapa commented Oct 18, 2023

thanks for contributing

@pamapa pamapa added this to the 2.3.1 milestone Oct 18, 2023
@dopry dopry deleted the fix/1206-exception-missing-id_token branch October 18, 2023 11:11
@dopry
Copy link
Contributor Author

dopry commented Oct 18, 2023

Thanks for maintaining!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid token specified: Cannot read properties of undefined (reading 'replace')
2 participants