p4nth3r.world Twitch Login
Opened this issue · 2 comments
Hi,
logged in to p4nth3r.world a few days ago (via Twitch login).
Visiting the manual directly, the Website says I'm still logged in (shows my Twitch avatar and Log out).
Switching to inventory via menu and I'm logged out (Avatar gone, button changing to Log in).
Happened a few times since I started playing, not sure if it's only when using the manual page as entry to p4nth3r.world
Yeah I only do a check on the inventory for valid authentication. I can do it on every page to make it more consistent. Thanks for reporting!
More info:
-
we check for a valid Twitch session via token in the backend when navigating to /inventory
-
every four hours (or so), the backend returns a 401 even though the front end session is "still valid"
-
when a player navigates to /inventory and gets a 401, they are logged out and redirected to the home page
-
without a standalone "auth check" endpoint for Twitch, we can't really adopt the same mechanism on all routes
-
I don't want a standalone "auth check" endpoint for Twitch to run on every page, because the API is slow and is already causing some slowdown issues in some backend endpoints
In the words of @yoshivb:
All of this is a lot of work to solve a problem thats just "sometimes i have to press to login button again"