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

CORS issue #7

Open
matthewjordaan opened this issue Sep 13, 2018 · 4 comments
Open

CORS issue #7

matthewjordaan opened this issue Sep 13, 2018 · 4 comments

Comments

@matthewjordaan
Copy link

matthewjordaan commented Sep 13, 2018

Apologies if this is not an issue or a failure on my side - when using this and following from the sample project I get a CORS problem:

Failed to load http://localhost:8080/auth/realms/demo/protocol/openid-connect/auth?redirect_uri=http:%2F%2Flocalhost:5595%2Fowin%2Fsecurity%2Fkeycloak%zzz.KeyCloakClientPortalSession%2Fcallback&response_type=code&scope=openid&state=oidc_state_d2b840d1da384a4392199e7b4c9d7721&client_id=zzz: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:5595' is therefore not allowed access.

From my research I need to add "enableCors: true" to the header for KeyCloak but don't seem to be able to come right with that

@ghost
Copy link

ghost commented Sep 13, 2018

@matthewjordaan Is zzz the client_id configured for the app on the server?

@matthewjordaan
Copy link
Author

@nettolicious yes it is

@ghost
Copy link

ghost commented Sep 14, 2018

@matthewjordaan and localhost:5595 is configured as a valid redirect? The only other thing I can think of is that the full redirect URI looks a little weird redirect_uri=http:%2F%2Flocalhost:5595%2Fowin%2Fsecurity%2Fkeycloak%zzz.KeyCloakClientPortalSession%2Fcallback ... That being said, I haven't worked with Keycloak in a while. You might try checking the logs on the server.

@matthewjordaan
Copy link
Author

@nettolicious yes - I added "http://localhost:5595/*" and "http://localhost:5595" as redirects to see. That redirect uri is created by the middleware... so I'm not sure

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