You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not really a bug, but an inconsistency in the configuration:
When not using an issuer config with the Keycloak provider (or any OAuth2 provider, ftm), it is compulsory to configure the authorization, token, and userinfo endpoints.
However, configuring the latter ones doesn't work in the expected way.
Configuring the issuer works the way one would expect:
In case this is intended (which I would think is a questionable decision), then at least a clear documentation should be in place how to configure the particular endpoints, as opposed to the issuer endpoint.
How to reproduce
See the linked repository.
The branch main shows an error when trying to sign in:
[auth][error] InvalidEndpoints: Provider "keycloak" is missing both `issuer` and `authorization` endpoint config. At least one of them is required. Read more at https://errors.authjs.dev#invalidendpoints
at assertConfig (webpack-internal:///(rsc)/./node_modules/next-auth/node_modules/@auth/core/lib/utils/assert.js:92:24)
at Auth (webpack-internal:///(rsc)/./node_modules/next-auth/node_modules/@auth/core/index.js:91:95)
at runNextTicks (node:internal/process/task_queues:65:5)
at process.processImmediate (node:internal/timers:459:9)
at process.callbackTrampoline (node:internal/async_hooks:130:17)
The branch https://github.com/ace130-github/authjs-provider-config/tree/fix/n/a_resolveConfigProblem shows the above mentioned workaround.
Expected behavior
The authorization, token, and userinfo endpoints should be configurable in the same way as the issuer.
The text was updated successfully, but these errors were encountered:
and following lines, where issuer is read from the provider object or, alternatively, from the provider.options object, whereas authorization, token, and userinfo are only read from provider directly.
Provider type
Keycloak
Environment
Reproduction URL
https://github.com/ace130-github/authjs-provider-config
Describe the issue
Not really a bug, but an inconsistency in the configuration:
When not using an
issuer
config with the Keycloak provider (or any OAuth2 provider, ftm), it is compulsory to configure theauthorization
,token
, anduserinfo
endpoints.However, configuring the latter ones doesn't work in the expected way.
Configuring the issuer works the way one would expect:
One (at least, me) would then expect to configure
authorization
etc. it like this:However, this does not work, as you can see in the linked repository (branch
main
).In order to make it work, you have to write the configuration like this:
which is pretty counter-intuitive.
In case this is intended (which I would think is a questionable decision), then at least a clear documentation should be in place how to configure the particular endpoints, as opposed to the issuer endpoint.
How to reproduce
See the linked repository.
The branch
main
shows an error when trying to sign in:The branch
https://github.com/ace130-github/authjs-provider-config/tree/fix/n/a_resolveConfigProblem
shows the above mentioned workaround.Expected behavior
The
authorization
,token
, anduserinfo
endpoints should be configurable in the same way as theissuer
.The text was updated successfully, but these errors were encountered: