Skip to content

Expand browser based calls check #35

Description

@Pieter-1337

@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
image
.

this results in a cors exception on my end.
image

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
image
image

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
image

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?

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions