mirror of
https://github.com/koel/koel.git
synced 2026-04-25 00:36:03 +03:00
[GH-ISSUE #1255] Gracefully handle JWT experation #717
Labels
No labels
Authentication
Dependencies
Documentation
Feature Request
Flac
Help Wanted
Installation/Setup
Integration
Mobile
PR Welcome
Pending Release
Performance
Playlist
S3
Search
Sync
[Pri] Low
[Pri] Normal
[Status] Keep Open
[Status] Needs Author Reply
[Status] Needs Review
[Status] Stale
[Status] Will Implement
[Type] Blessed
[Type] Bug
[Type] Duplicate
[Type] Enhancement
[Type] Help Request
[Type] Question
[Type] Task
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/koel-koel#717
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @fschlaef on GitHub (Nov 10, 2020).
Original GitHub issue: https://github.com/koel/koel/issues/1255
Describe the bug
When session timeout is reached and I try to play a song, it doesn't because I'm not logged in anymore. However, instead of redirecting me to login page or displaying an alert, Koel tries to play all songs in the playlist in rapid succession, which doesn't work but spams the API with calls, which eventually leads to a 429 - Too Many Requests error.
Reloading the page displays the login screen with no alert shown, but developer console shows the error.
Waiting a couple minutes resolves the issue
To reproduce
Login
Wait for session timeout (don't know how long it is, I locked the session for ~2 hours)
Attempt to start a playlist
Expected behavior
An error is shown, or redirection to login page
Environment
@BrookeDot commented on GitHub (Dec 30, 2020):
I think this will also fix #847 and #1228.
I agree that ideally, invalid token would redirect back to the login page. Might also be good to allow the token expiration to be customized.
@phanan commented on GitHub (Dec 30, 2020):
Invalid tokens should redirect back to the login page indeed. I've attempted several times in the past, but for some reason it never really worked. This, however, won't be a problem anymore in the next major version of Koel, as we're switching to Laravel Sanctum with basically non-expiring tokens.