-
Notifications
You must be signed in to change notification settings - Fork 19
Description
We have a service using the oidc golib package and keymaster for auth and would like to make AJAX requests to the service from a client-side JS app.
Currently, if the user has not gone through the auth flow to get a cookie set for the service, our AJAX POST request to the service will get redirected to the keymaster login, which will proceed to get blocked by CORS as it has no CORS headers on the response and prevent the browser from showing anything about the response.
Is there any way we could either set those headers for keymaster (not sure if thats actually what we want or how the flow would work in that case), be able to go through the flow in an iframe, or have the oidc golib package return a 401 Unauthorized with a link to the keymaster auth on AJAX requests (denoted by some header) so that we can manually redirect the user?