[GH-ISSUE #242] Client is unusable due to token changes #146

Closed
opened 2026-02-27 19:17:02 +03:00 by kerem · 9 comments
Owner

Originally created by @EddieTheCubeHead on GitHub (Apr 14, 2024).
Original GitHub issue: https://github.com/EddieTheCubeHead/Stagnum/issues/242

No matter what core returns to the token check client doesn't redirect to login. Thus erroring requests (no token, invalid token) also don't force login. Only way to use client at the moment is to navigate to the login page manually.

Make it so erroring requests in token check force relogin.

Originally created by @EddieTheCubeHead on GitHub (Apr 14, 2024). Original GitHub issue: https://github.com/EddieTheCubeHead/Stagnum/issues/242 No matter what core returns to the token check client doesn't redirect to login. Thus erroring requests (no token, invalid token) also don't force login. Only way to use client at the moment is to navigate to the login page manually. Make it so erroring requests in token check force relogin.
kerem closed this issue 2026-02-27 19:17:02 +03:00
Author
Owner

@OttoAhlfors commented on GitHub (Apr 15, 2024):

Redirection works for me on master. I can look into this further but somenone needs to show me what the issue is

<!-- gh-comment-id:2055518307 --> @OttoAhlfors commented on GitHub (Apr 15, 2024): Redirection works for me on master. I can look into this further but somenone needs to show me what the issue is
Author
Owner

@EddieTheCubeHead commented on GitHub (Apr 15, 2024):

For me, this reproduced running with docker compose in Master. Maybe that helps?

<!-- gh-comment-id:2055566366 --> @EddieTheCubeHead commented on GitHub (Apr 15, 2024): For me, this reproduced running with docker compose in Master. Maybe that helps?
Author
Owner

@OttoAhlfors commented on GitHub (Apr 15, 2024):

Even with docker its working as it should

<!-- gh-comment-id:2055948888 --> @OttoAhlfors commented on GitHub (Apr 15, 2024): Even with docker its working as it should
Author
Owner

@EddieTheCubeHead commented on GitHub (Apr 15, 2024):

Then feel free to close as works as expected 👍

<!-- gh-comment-id:2055953001 --> @EddieTheCubeHead commented on GitHub (Apr 15, 2024): Then feel free to close as works as expected :+1:
Author
Owner

@OttoAhlfors commented on GitHub (Apr 15, 2024):

Okay there were some changes I had not pulled and now its busted, will start to work on a fix

<!-- gh-comment-id:2056461255 --> @OttoAhlfors commented on GitHub (Apr 15, 2024): Okay there were some changes I had not pulled and now its busted, will start to work on a fix
Author
Owner

@EddieTheCubeHead commented on GitHub (Apr 15, 2024):

Luckily I think the fix should be simple. If you just check return code >= 400 and reroute those to login it should work(?)

<!-- gh-comment-id:2056463121 --> @EddieTheCubeHead commented on GitHub (Apr 15, 2024): Luckily I think the fix should be simple. If you just check return code >= 400 and reroute those to login it should work(?)
Author
Owner

@OttoAhlfors commented on GitHub (Apr 15, 2024):

I am getting some cors errors okay these were caused by someone switching backend ports

<!-- gh-comment-id:2056473723 --> @OttoAhlfors commented on GitHub (Apr 15, 2024): I am getting some cors errors okay these were caused by someone switching backend ports
Author
Owner

@OttoAhlfors commented on GitHub (Apr 15, 2024):

Luckily I think the fix should be simple. If you just check return code >= 400 and reroute those to login it should work(?)

I dont think thats the issue the if else check that should reroute the user when code and state arent defined is workign as it should, for some reason the actual redirect fuction isnt working

<!-- gh-comment-id:2056486910 --> @OttoAhlfors commented on GitHub (Apr 15, 2024): > Luckily I think the fix should be simple. If you just check return code >= 400 and reroute those to login it should work(?) I dont think thats the issue the if else check that should reroute the user when code and state arent defined is workign as it should, for some reason the actual redirect fuction isnt working
Author
Owner

@OttoAhlfors commented on GitHub (Apr 15, 2024):

Fix has been found, there seems to be an issue with redirect and .catch() dont know why it did not come up earlier changing redirect() to router.push() seems to work

<!-- gh-comment-id:2056559821 --> @OttoAhlfors commented on GitHub (Apr 15, 2024): Fix has been found, there seems to be an issue with redirect and .catch() dont know why it did not come up earlier changing redirect() to router.push() seems to work
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Stagnum#146
No description provided.