LinguaCafe icon indicating copy to clipboard operation
LinguaCafe copied to clipboard

The application should route to login if the user was automatically logged out / his session is no longer valid

Open mateuszmrw opened this issue 1 year ago • 2 comments

As in title. I think it's either a feature or a bug. Now if you are automatically logged out you and keep the Tab/PWA App open you need to refresh page or go to login manually. The user should be automatically routed to the login page when it happens.

mateuszmrw avatar Jun 11 '24 14:06 mateuszmrw

Oh, I misread this as the logout is broken.

This is a good idea, I'll check if I can implement it. I think I could add a request every 2-5 minutes to check if the session is expired, but I think that would prolong the lifetime of the session. I have similar problems in an other project as well.

simjanos-dev avatar Jun 12 '24 17:06 simjanos-dev

@simjanos-dev you can try a "naive" approach -> if the front-end gets an Unauthorized Error from the API route to the login. That would require fixing bug that calls user settings and font endpoint on the login page but should work.

mateuszmrw avatar Jun 12 '24 19:06 mateuszmrw