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

[SDK-1846] Add ability to get new access tokens #15

Merged
merged 4 commits into from
Jul 28, 2020

Conversation

stevehobbsdev
Copy link
Contributor

This PR adds wrapper methods for:

  • getTokenSilently
  • getTokenWithPopup

In this SDK, they are also renamed (respectively):

  • getAccessTokenSilently
  • getAccessTokenWithPopup

This is for consistency with auth0-react.

Injectable,
Inject,
OnDestroy,
ɵCodegenComponentFactoryResolver,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's a weird symbol here. Is this intentional? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this is a weird Angular type. The type name is correct but I don't think I need the import - will remove.

* If an `audience` value is given to this function, the SDK always falls
* back to using an iframe to make the token exchange.
*
* Note that in all cases, falling back to an iframe requires access to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this informational note is for samesite. Do we want to expand a bit on that or is this a copy of the react one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This actually refers to third-party cookie blocking in browsers like Safari and Brave, not really to do with SameSite. I've clarified that now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But yes - otherwise it's copied from the React SDK.

@stevehobbsdev stevehobbsdev merged commit 7e312ba into master Jul 28, 2020
@stevehobbsdev stevehobbsdev deleted the feature/get-token-silently branch July 28, 2020 20:46
@lbalmaceda lbalmaceda added this to the v0.1.0 milestone Aug 14, 2020
@lbalmaceda lbalmaceda added the CH: Added PR is adding feature or functionality label Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CH: Added PR is adding feature or functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants