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

Keycloak tokens not accepted due to: Invalid token - invalid issues #368

Open
eldarj opened this issue Apr 22, 2022 · 0 comments
Open

Keycloak tokens not accepted due to: Invalid token - invalid issues #368

eldarj opened this issue Apr 22, 2022 · 0 comments

Comments

@eldarj
Copy link

eldarj commented Apr 22, 2022

Not sure if this related to oauth2-client-bundle or only to stevenmaguire/oauth2-keycloak, but for the sake of resolving the issue, I'll post here as well.

Related issue: stevenmaguire/oauth2-keycloak/issues/45

I'm using the above mentioned lib to authenticate with Keycloak. I configured the auth-server-url, realm, client etc. and everything works fine.

But if I have multiple domain names (e.g DomainA and DomainB) pointing to the same Keycloak server, and depending on some circumstances I redirect users to login to either DomainA or DomainB -- all the tokens (ie user logins) generated on the second domain DomainB will be rejected, as the DomainA was used to set auth-server-url.

Basically, Keycloak uses the URL to set the iss claim in token, and if this is different than auth-server-url, the secured application will deny the token.

Is there a workaround? How can I define multiple valid issuers ie auth servers?

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

No branches or pull requests

1 participant