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

Export IdToken and User types #237

Merged
merged 1 commit into from
Nov 1, 2021

Conversation

4javier
Copy link
Contributor

@4javier 4javier commented Oct 31, 2021

Add TokenId interface and User class export from auth0-spa-js

Description

Exporting IdToken interface and User class from auth0-spa-js makes IDEs auto-import working.

These definitions can come in handy when the consumer of the library needs to expand the objects emitted by idTokenClaims$ and user$ observables respectively, adding properties reflecting custom claims.

Testing

authVm$: Observable<IdToken & {roles: string}>;
this.authVm$ = this.auth.idTokenClaims$.pipe(
  map(claims => ({...claims, roles: claims['https://yourUrl.com/roles']}))
);

Add TokenId interface and User class export from auth0-spa-js
@4javier 4javier requested a review from a team as a code owner October 31, 2021 16:13
@frederikprijck frederikprijck changed the title Update public-api.ts to export IdToken and User Export IdToken and User types Nov 1, 2021
@frederikprijck frederikprijck added the CH: Changed PR is changing something label Nov 1, 2021
@frederikprijck frederikprijck merged commit 492f33b into auth0:master Nov 1, 2021
@frederikprijck frederikprijck added this to the v1.8.1 milestone Dec 7, 2021
@frederikprijck frederikprijck mentioned this pull request Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CH: Changed PR is changing something
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants