We are creating an Angular app running on “http://localhost:4200” that we have working to pull back ID, Access and Refresh tokens but when we try to leverage the Refresh token from a front end JS call to pull back new ID and Access tokens we get a CORS error.
Error: “has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource”
Looking at old devforum posts like “CORS headers for /oauth2/v1/token” makes us confused on if this should even work via frontend call and if we should be trying to leverage our custom authorization server or use default or exclude it altogether from the call.
The “.well-known/oauth-authorization-server” for our custom authorization server endpoint shows that we should be using “oauth2/{authserver}/v1/token”. We have “http://localhost:4200” added to Trusted Origins and have tried all the following API calls formats but all fail.
* /oauth2/v1/token
* /oauth2/default/v1/token
* /oauth2/{authserver}/v1/token
We are using “/oauth2/{authserver}/v1/{authorize/introspect}” for all the API calls that are working from our Angular app but are having CORS issue only with the “token” endpoint.