I'm using angular-keycloak 7.1.0 with keycloak 8.0.2 (and keycloak-js 8.0.2). I created an openIdConnect realm with a client, configured with Access Type: public and a fine grain OpenID Connect Configuration to create ES256 JWTs (JSON Web Token).
When I try to login via my Ionic-Angular Web-App (Chrome, Safari) the keycloak login form is displayed, if user isn't logged in yet. After submitting credentials the /token endpoint is called successfully and responds the expected JWT.
But then the keycloak-angular-lib calls 'http://localhost:8080/auth/realms/REALM_NAME/account' to access the user profile, which delivers:
Access to XMLHttpRequest at 'http://localhost:8080/auth/realms/REALM_NAME/account' from origin
'http://localhost:1337' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is
present on the requested resource.
Several more hints:
I already tried all variants of keycloak client configuration with * and +, relative and absolute paths for Web Origins and Valid Redirect URIs.
/token request works fine.
I made several changes on client scope mappers, especially on profile mapper.
I can access the /account path via postman
