@fancyDevelopment, I ran into an issue today with the gateway. Let's say we have a cookie/session that is timed out, but our user is still on the page in the frontend, he now clicks a button that makes an api call, the UseGatewayAuthentication will now see that the cookie is expired an will try to call the authorize endpoint on the idp. Basically this

.
this results in a cors exception on my end.

did you encounter this situation yet
performing normal login logout from the same origin works as expected
so it's only when challenging after an api call from the frontend that this happens
I would epect a 401 here perhaps instead of a 302 on the api call we are making?
it seems that we are trying to handle that here however the header you are checking on is not present in my context


I think we might need to check for fetch api for instance instead of only the ajax calls we are checking now?
I would propose something like this

If i do this I get a 401 in the browser instead of the cors error, at that point the SPA can handle this as it sees fit?
@fancyDevelopment, I ran into an issue today with the gateway. Let's say we have a cookie/session that is timed out, but our user is still on the page in the frontend, he now clicks a button that makes an api call, the UseGatewayAuthentication will now see that the cookie is expired an will try to call the authorize endpoint on the idp. Basically this

.
this results in a cors exception on my end.

did you encounter this situation yet
performing normal login logout from the same origin works as expected
so it's only when challenging after an api call from the frontend that this happens
I would epect a 401 here perhaps instead of a 302 on the api call we are making?
it seems that we are trying to handle that here however the header you are checking on is not present in my context


I think we might need to check for fetch api for instance instead of only the ajax calls we are checking now?
I would propose something like this

If i do this I get a 401 in the browser instead of the cors error, at that point the SPA can handle this as it sees fit?