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

Support userinfo endpoint as fallback for groups #20

Closed
wants to merge 2 commits into from
Closed

Support userinfo endpoint as fallback for groups #20

wants to merge 2 commits into from

Conversation

santoru
Copy link

@santoru santoru commented Oct 15, 2021

The current implementation to retrieve groups of a user to set its permission role (staff, admin) is broken and there are multiple issues open ( #8 #14).

From my knowledge, Okta does not return the groups claim by default unless it is explicitly configured in the web UI. This solution however does not seems to work as Okta only returns groups ownership via the userinfo endpoint and not via the token endpoint.

The proposed solution applies a fallback request to the userinfo endpoint if the groups claim is not found using the token endpoint. This solution does not change the current implementation but only try to retrieve the groups claim from a new endpoint if it's not present on the token endpoint.

For the sake of reusability, a new generic function to interact with the userinfo endpoint was added, even if at this point in time only the groups claim is used.

@santoru santoru closed this Oct 19, 2021
@santoru santoru deleted the support-userinfo-as-fallback branch October 19, 2021 17:38
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.

None yet

1 participant