OKTA allows to define custom authorization server instead of using the organization authorization server. This is a usual practice when your OKTA server has to support the authorization process of several applications.
The .well-know URL has a different format for those servers. It would be nice to support them as well.
I have unfortunately no time to make a proper pull request. But here would be the code to implement this little change adding a 'auth_Server_id' parameter to the constructoR..
class OktaOAuth2(OpenID):
def __init__(
self,
client_id: str,
client_secret: str,
okta_domain: str,
auth_server_id: Optional[str] = None,
scopes: Optional[List[str]] = BASE_SCOPES,
name: str = "okta",
):
well_known_url = f"https://{okta_domain}/.well-known/openid-configuration" if auth_server_id is None \
else f"https://{okta_domain}/oauth2/{auth_server_id}/.well-known/openid-configuration"
super().__init__(
client_id,
client_secret,
well_known_url,
name=name,
base_scopes=scopes,
)
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too