Failed OAuth callbacks leave the listener running #19

Open
opened 2026-08-22 20:33:32 +00:00 by faceguy · 0 comments
Owner

When token exchange fails, the callback handler in ListenForToken() reports the error but does not close the HTTP server. Retrying login in the same TUI session with the same redirect port can consequently fail because the previous listener still owns the port.

This was reproduced by sending a callback with an invalid OAuth state and then attempting to bind a second listener to the redirect address; the bind failed with address already in use after the error callback completed.

When token exchange fails, the callback handler in `ListenForToken()` reports the error but does not close the HTTP server. Retrying login in the same TUI session with the same redirect port can consequently fail because the previous listener still owns the port. This was reproduced by sending a callback with an invalid OAuth state and then attempting to bind a second listener to the redirect address; the bind failed with `address already in use` after the error callback completed.
faceguy self-assigned this 2026-08-22 20:33:32 +00:00
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
faceguy/my-spotify-playlist-sorter-go#19
No description provided.