I am trying to get user credentials (to see OPT configuration) from Angular app. I am trying to call one of 2 API urls:
- 'https://BASE_URL/auth/realms/REALM_NAME/account/credentials'
or
- 'https://BASE_URL/auth/realms/REALM_NAME/users/6408bff2-28c6-45d4-8d93-abac57585c42/configured-user-storage-credential-types'
The second one is listed in REST API documentation.
I am trying with token included.
Both of these gives me cors error.
I tried setting web origin to '*' or '+' in main client, but also in account and account-console clients.
Should Keycloak API be directly accessible from client, or only from server (spirng)?
Update: I'm trying this again, trying to use Keycloak on localhost:8080 (so it's the same domain and the client).
When I do GET from http://localhost:8080/auth/realms/ninegold/
I receive this:
But when trying to get user info: GET http://localhost:8080/auth/realms/ninegold/users/0e0cf56d-d809-48b0-ac04-bc9dace51be9/