SanjinDedic / agent_games

Secure, extensible agent competition platform API build with FastAPI, SQLmodel, Pydantic and Docker
9 stars 2 forks source link

Troubleshoot invalid token breaking pages #64

Closed SanjinDedic closed 2 months ago

SanjinDedic commented 3 months ago

This is what needs fixing:

when the token is invalid (from a different session or expired)

The login page and the submission no longer works.

So try validating the token fist and if invalid clearing local storage.

DawoodLaiq commented 3 months ago

Session storage is added instead of local storage so when a user is active the redux state is active only that time.

For expiry of auth tokens. The expiry date and time created from the backend is not fixed so we need to assign it to only one specific time zone.