Checklist
Description
There's a feature gap in the JS SDK that's causing us to be unable to use OIDC auth in the SDK (and it's inconsistent elsewhere too).
Golang (I'm taking to be the reference SDK by default here):
JS:
|
url: `https://${clientCredentials.apiTokenIssuer}/oauth/token`, |
- Regardless of the path string you give, you get the https:// prefix added, and you can't stop the suffix being added.
Python:
Dotnet:
Java:
This has been a blocker for us because Zitadel uses /oauth/v2/token as its token endpoint, so the JS SDK is trying to call https://auth.example.com/oauth/v2/token/oauth/token instead of https://auth.example.com/oauth/v2/token.
Expectation
All the SDKs to have the same configuration interface so I can use OIDC.
Reproduction
- Try to use OIDC auth on OpenFGA with the JS SDK.
- Use an Oauth2 provider with a non default path to the token off the base domain.
- Fail to get token.
OpenFGA SDK version
0.6.2
OpenFGA version
1.5.8
Checklist
Description
There's a feature gap in the JS SDK that's causing us to be unable to use OIDC auth in the SDK (and it's inconsistent elsewhere too).
Golang (I'm taking to be the reference SDK by default here):
JS:
js-sdk/credentials/credentials.ts
Line 147 in dc44d69
Python:
Dotnet:
Java:
This has been a blocker for us because Zitadel uses
/oauth/v2/tokenas its token endpoint, so the JS SDK is trying to callhttps://auth.example.com/oauth/v2/token/oauth/tokeninstead ofhttps://auth.example.com/oauth/v2/token.Expectation
All the SDKs to have the same configuration interface so I can use OIDC.
Reproduction
OpenFGA SDK version
0.6.2
OpenFGA version
1.5.8