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

Add PKCE to Okta auth #1400

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rabbit-aaron
Copy link

Okta supports PKCE with Client ID / Client Secret authentication.

In OAuth 2.1 (currently draft), auth code flow is recommended to use PKCE.
https://datatracker.ietf.org/doc/draft-ietf-oauth-v2-1/

@rabbit-aaron rabbit-aaron force-pushed the add-okta-pkce-support branch 2 times, most recently from 06ff984 to cdd19bd Compare October 11, 2024 13:19
@@ -268,19 +292,31 @@ def _OAUTH_AUTHORIZE_URL(self):
def _OAUTH_ACCESS_TOKEN_URL(self):
return f"{self.base_url}/v1/token"

@property
def _oauth_okta_scope(self):
return self.application.options.oauth2_okta_scope.split()
Copy link
Author

Choose a reason for hiding this comment

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

OKTA supports adding different claims to the ID token based on the scopes set.
In our case we needed the "groups" claim and that is configured to require a "groups" scope in the request.

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.

1 participant