[PR #436] [CLOSED] Add OAuth token authentication #924

Closed
opened 2026-02-27 20:00:28 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/librespot-org/librespot/pull/436
Author: @dhenneke
Created: 2/16/2020
Status: Closed

Base: devHead: oauth-token-authentication


📝 Commits (3)

  • 5a5f87a Add missing AuthenticationType that is returned by spotify during the spotify-token authentication
  • 67183d4 Add option to use token-based authentication (returned form the Spotify OAuth flow)
  • 9883b0d Regenerate protobuf file

📊 Changes

4 files changed (+50 additions, -27 deletions)

View changed files

📝 core/src/authentication.rs (+21 -6)
📝 protocol/proto/authentication.proto (+2 -0)
📝 protocol/src/authentication.rs (+25 -21)
📝 src/main.rs (+2 -0)

📄 Description

This PR adds an option to login with an Spotify OAuth token. Get a token and request the streaming scope.

Start with: librespot --username user --token YOUR_OAUTH_TOKEN

When I use AuthenticationType::AUTHENTICATION_SPOTIFY_TOKEN as authType, the API for some reason replies with an Authentication Type of 0x7. Since I don't know what this value means originally, I just added a placeholder type to the proto file.


🔄 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/librespot-org/librespot/pull/436 **Author:** [@dhenneke](https://github.com/dhenneke) **Created:** 2/16/2020 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `oauth-token-authentication` --- ### 📝 Commits (3) - [`5a5f87a`](https://github.com/librespot-org/librespot/commit/5a5f87a4ee010069d49923e95f0eb9e0a5784b95) Add missing AuthenticationType that is returned by spotify during the spotify-token authentication - [`67183d4`](https://github.com/librespot-org/librespot/commit/67183d45dee7f40fa35fef1c2a0a2f11dfedd5e4) Add option to use token-based authentication (returned form the Spotify OAuth flow) - [`9883b0d`](https://github.com/librespot-org/librespot/commit/9883b0d0bf385990b85b95a881eed5e7bd36e864) Regenerate protobuf file ### 📊 Changes **4 files changed** (+50 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `core/src/authentication.rs` (+21 -6) 📝 `protocol/proto/authentication.proto` (+2 -0) 📝 `protocol/src/authentication.rs` (+25 -21) 📝 `src/main.rs` (+2 -0) </details> ### 📄 Description This PR adds an option to login with an Spotify OAuth token. Get a [token](https://developer.spotify.com/documentation/general/guides/authorization-guide/) and request the [streaming](https://developer.spotify.com/documentation/general/guides/scopes/#streaming) scope. Start with: `librespot --username user --token YOUR_OAUTH_TOKEN` When I use `AuthenticationType::AUTHENTICATION_SPOTIFY_TOKEN` as authType, the API for some reason replies with an Authentication Type of `0x7`. Since I don't know what this value means originally, I just added a placeholder type to the proto file. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:00:28 +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/librespot#924
No description provided.