[PR #98] [MERGED] First implementation of automatic recognition of redirect url #606

Closed
opened 2026-02-28 14:50:11 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Rigellute/spotify-tui/pull/98
Author: @jfaltis
Created: 10/22/2019
Status: Merged
Merged: 10/23/2019
Merged by: @Rigellute

Base: auto-redirect-codeHead: auto-redirect-code


📝 Commits (1)

  • 5d257f5 experimental implementation of automatic recognition of redirect url

📊 Changes

3 files changed (+68 additions, -28 deletions)

View changed files

📝 src/main.rs (+26 -14)
📝 src/redirect_uri.html (+1 -1)
📝 src/redirect_uri.rs (+41 -13)

📄 Description

This is my first approach of implementing https://github.com/Rigellute/spotify-tui/issues/96. The local webserver now starts just before the token request and listens for incoming GET requests. When a get request is received it tries to "parse" the URL. If the start of the webserver fails or the GET request cant be parsed it returns to manual authentication (old way).

The problem I see with the current state of my implementation:

  • If the redirect url is not aimed at port 8888 but at a different port (since this can be configured in the Spotify Dashboard) the program would wait for ever because it won't receive a GET request. I guess I have to implement some kind of timeout after which the program will return to manual authentication.

What do you think?


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Rigellute/spotify-tui/pull/98 **Author:** [@jfaltis](https://github.com/jfaltis) **Created:** 10/22/2019 **Status:** ✅ Merged **Merged:** 10/23/2019 **Merged by:** [@Rigellute](https://github.com/Rigellute) **Base:** `auto-redirect-code` ← **Head:** `auto-redirect-code` --- ### 📝 Commits (1) - [`5d257f5`](https://github.com/Rigellute/spotify-tui/commit/5d257f565c32aa3e4e4043d5c5f65dc10b6c7d4b) experimental implementation of automatic recognition of redirect url ### 📊 Changes **3 files changed** (+68 additions, -28 deletions) <details> <summary>View changed files</summary> 📝 `src/main.rs` (+26 -14) 📝 `src/redirect_uri.html` (+1 -1) 📝 `src/redirect_uri.rs` (+41 -13) </details> ### 📄 Description This is my first approach of implementing https://github.com/Rigellute/spotify-tui/issues/96. The local webserver now starts just before the token request and listens for incoming GET requests. When a get request is received it tries to "parse" the URL. If the start of the webserver fails or the GET request cant be parsed it returns to manual authentication (old way). The problem I see with the current state of my implementation: - If the redirect url is not aimed at port 8888 but at a different port (since this can be configured in the Spotify Dashboard) the program would wait for ever because it won't receive a GET request. I guess I have to implement some kind of timeout after which the program will return to manual authentication. What do you think? --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 14:50:11 +03: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
starred/spotify-tui#606
No description provided.