CORS issue with the new version of Keycloak-angular
See original GitHub issueBug Report or Feature Request (mark with an x
)
- [x] bug report -> please search for issues before submitting
- [ ] feature request
Versions.
keycloak-angular: 7.3.1 Angular: 9.1.7 Keycloak 9.0.0.
Repro steps.
- New ream created
- New client created
- Client settings (image). Access type: Confidential and Authorization enabled as we want to use these features.
- When the application runs, we are getting a CORS error.
Additional info: We did follow all the steps for library implementation. (Including view-profile within the scope)
The log given by the failure.
Console log output:
Desired functionality.
Previously, we used keycloak-angular 6.1.0 and we haven’t had this issue before. When we switched to the new version, the issue started appearing. Do you have any info on what could be causing the problem and what would be the best course of action to fix it?
Issue Analytics
- State:
- Created 3 years ago
- Comments:14
Top Results From Across the Web
Keycloak angular No 'Access-Control-Allow-Origin' header is ...
TLDR; If you call keycloak endpoints before the init call is finished, the response will lack CORS headers and you'll get a CORS...
Read more >CORS blocked #91 - mauriciovigolo/keycloak-angular - GitHub
I have setup keycloak on another host as my angular application. When I access the angular application I get redirected to the login...
Read more >Keycloak CORS issue with Angular App - Getting advice
I currently have keycloak setup with a simple realm, the client is set to be confidential, webOrigins: https://localhost:4200, Browser Flow: ...
Read more >How to Use Keycloak with a CORS-enabled API-gateway
This article describes how you can use Keycloak behind an API-gateway that considers CORS requests, which by default does not work.
Read more >CORS REST request blocked by browser - keycloak-user
Hi to all,in my use case i have a typical web application made up on a frontend layer written completely with Angular js...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks @DamjanJ . I’ve this issue and to solve i downgrade the version is order to use it. IMHO, it’s a shame to not provide this. An excelent project with with failure… 😕
Is there an update on this issue? I am getting for the confidential client where we also need the authorization part: Access to XMLHttpRequest at ‘https://keycloakx.example.com/realms/xxxx/protocol/openid-connect/token’ from origin ‘http://localhost:4200/’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. We are using: “@angular/core”: “^12.2.0” “keycloak-angular”: “^8.4.0”, “keycloak-js”: “^15.1.1”
BTW: The solution from @MVVN did not help.