-
Notifications
You must be signed in to change notification settings - Fork 51
[All SDKs] OAuth token endpoint should be configurable and/or support oidc discovery #238
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
Comments
I opened the PR #240 for the Java SDK. I have prepared all other SDKs (go, js, dotnet and python) but I'll wait your review on this one before submitting them 😃. |
@le-yams do you still have the other sdk examples around? I know it's been a while! |
Hi I've opened the PR #421 for the Python SDK. Looking forward to a review |
The only way this can be properly solved is to use the well known endpoint of the IDP in question, to correctly discover endpoints for the Additionally, the reliance on audience for OIDC client credentials auth doesn't work for Amazon Cognito (as far as I can tell) as it doesn't appear to support audience and there is no |
Unfortunately, also the Python SDK still seems to experience this issue, as the suffix is hardcoded in the OAuth client's Edit: Should be fixed now. |
Description
For clients using OAuth2 credentials, the token endpoint is currently hardcoded in all SDKs (with
/oauth/token
value).Could it be possible to make it configurable? Or even better support oidc discovery?
I'm willing to contribute if that's something you would be interested in :)
Steps to take
Change the
apiTokenIssuer
field in the configuration to accept a full URL.So:
ApiTokenIssuer
issuer.fga.example
https://issuer.fga.example/oauth/token
https://issuer.fga.example
https://issuer.fga.example/oauth/token
https://issuer.fga.example:8080
https://issuer.fga.example:8080/oauth/token
issuer.fga.example/some_endpoint
https://issuer.fga.example/some_endpoint
https://issuer.fga.example/some_endpoint
https://issuer.fga.example/some_endpoint
https://issuer.fga.example:8080/some_endpoint
https://issuer.fga.example:8080/some_endpoint
Of course, we'll need to do some of the validations to ensure e.g. users are passing fields with
https
orhttp
(and not e.g. ftp) and that the full url is validRelated Issues
SDKs to be updated
The text was updated successfully, but these errors were encountered: