-
Notifications
You must be signed in to change notification settings - Fork 30
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
feat: support role based auth directive - OKTA-277249 #66
Conversation
const value = groups[key]; | ||
|
||
// groups or custom claims is avaiable in idToken | ||
if (idToken.claims[key]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would verifying ID token before checking the claims be useful for this feature?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's checked at the beginning of this method. around line 39
src/okta/has-any-group.directive.ts
Outdated
@Input() set oktaHasAnyGroup(groups: Groups) { | ||
this.authStateService.hasAnyGroups(groups) | ||
.subscribe(isAuthorized => { | ||
// not update UI if no state change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// not update UI if no state change | |
// don't update UI if no state change |
const key = Object.keys(groups)[0]; | ||
const value = groups[key]; | ||
|
||
// groups or custom claims is avaiable in idToken |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// groups or custom claims is avaiable in idToken | |
// groups or custom claims is available in idToken |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor typos
1834a11
to
f4b6860
Compare
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Reviewers