I’ve setup an SPA application in OKTA and that does not give the option to retrieve Refresh token.
Is it possible to retrieve a refresh token using SPA applications? What would be the best approach to avoid redirecting the user to login in OKTA when the token gets expired?
Hi @nate.barbettini. I am making a call to issuerEndpoint + ‘/v1/authorize?prompt=none’ including an existing access token in the authorization header. I am getting a CORS error even if I added my issuer and the domain where this SPA is running to trusted origins under Security > API. Any suggestions?
If you are still facing this issue, could you capture the network traces as a har file along with the error from console and email developers@okta.com for further analysis ? Usually CORS error should not occur if the base url is added to the Trusted Origin (Security->API-> Trusted Origin) and CORS is enabled.
It depends if you are using refresh_token or not. If not, then you have to call /authorize while your Okta session is still active. If you use refresh_token call to /token any time refresh_token is still valid