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 cached scopes when using detailed response mode #824

Merged
merged 3 commits into from
Oct 20, 2021

Conversation

stevehobbsdev
Copy link
Contributor

Changes

This PR ensures that the scopes as returned from the token endpoint are recorded in the cache by handleRedirectCallback. This fixes an issue where using getTokenSilently({ detailedResponse: true }) immediately after a login would yield no scope property, despite being returned by the endpoint, but are then populated later after a page refresh (thanks to checkSession).

The PR also addresses a minor issue where detailedResponse was being sent as a custom property to the /authorize and /oauth/token endpoints.

References

Fixes #823

Testing

  • This change adds unit test coverage
  • This change adds integration test coverage
  • This change has been tested on the latest version of the platform/language

Checklist

@stevehobbsdev stevehobbsdev added the review:small Small review label Oct 20, 2021
@stevehobbsdev stevehobbsdev marked this pull request as ready for review October 20, 2021 12:47
@stevehobbsdev stevehobbsdev requested a review from a team as a code owner October 20, 2021 12:47
@stevehobbsdev stevehobbsdev merged commit 3ca3edd into master Oct 20, 2021
@stevehobbsdev stevehobbsdev deleted the fix/detailed-response-scope branch October 20, 2021 13:22
@stevehobbsdev stevehobbsdev mentioned this pull request Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review:small Small review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scopes are unavailable in detailed response after initial login
2 participants