chairemobilite / transition

Transition is a modern new approach to transit planning. It's a web application to model, simulate and plan public transit and alternative transportation.
http://transition.city
MIT License
20 stars 13 forks source link

frontend: Extract the `verifyAuthentication` method #920

Closed tahini closed 2 months ago

tahini commented 2 months ago

This allows other code path to re-use the app loading code to verify authentication. One example is when the user is logged out, the requests will typically return a 401 response to the application. The code handling this response code can request the server to verifyAuthentication and thus differentiate between a logged out user and one trying to access a forbidden resource.

tahini commented 2 months ago

This will allow to fix evolution's issue https://github.com/chairemobilite/evolution/issues/53