[PR #246] [MERGED] PKCE Auth Flow #339

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

📋 Pull Request Information

Original PR: https://github.com/ramsayleung/rspotify/pull/246
Author: @marioortizmanero
Created: 8/31/2021
Status: Merged
Merged: 9/25/2021
Merged by: @ramsayleung

Base: masterHead: pkce


📝 Commits (10+)

📊 Changes

13 files changed (+284 additions, -179 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 Cargo.toml (+1 -0)
📝 examples/auth_code.rs (+4 -7)
📝 examples/auth_code_pkce.rs (+25 -14)
📝 examples/client_creds.rs (+4 -3)
📝 rspotify-model/src/auth.rs (+31 -1)
📝 src/auth_code.rs (+26 -26)
📝 src/auth_code_pkce.rs (+71 -34)
📝 src/client_creds.rs (+7 -2)
📝 src/clients/base.rs (+19 -21)
📝 src/clients/mod.rs (+3 -47)
📝 src/clients/oauth.rs (+2 -2)
📝 src/lib.rs (+90 -22)

📄 Description

Description

This implements the PKCE auth flow. It also removes quite a few TODOs in the code.

Closes #150

Dependencies

I had to add sha2 in order to hash the verifier code with SHA256.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

  • The examples/auth_code_pkce.rs example

🔄 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/ramsayleung/rspotify/pull/246 **Author:** [@marioortizmanero](https://github.com/marioortizmanero) **Created:** 8/31/2021 **Status:** ✅ Merged **Merged:** 9/25/2021 **Merged by:** [@ramsayleung](https://github.com/ramsayleung) **Base:** `master` ← **Head:** `pkce` --- ### 📝 Commits (10+) - [`0415aba`](https://github.com/ramsayleung/rspotify/commit/0415abad00de4d877d75da211f1c1217973a4751) obtaining URL - [`69e3b55`](https://github.com/ramsayleung/rspotify/commit/69e3b553484ffb47671239cd450b2466612da751) More TODOs - [`319abd0`](https://github.com/ramsayleung/rspotify/commit/319abd04602035c10637994b63320b8a337a4e0a) Rename headers for consistency - [`347f1b7`](https://github.com/ramsayleung/rspotify/commit/347f1b7df07ba0283a9e368a47d39f371e5f607d) Base implementation - [`6ad71dd`](https://github.com/ramsayleung/rspotify/commit/6ad71dd63f96e903ee41fa86111712dc7b44f23e) Small fixes - [`eea632f`](https://github.com/ramsayleung/rspotify/commit/eea632f891b6202b8b3ce8e4d9b7444858ec573b) More small fixes, figuring out why the 400 code - [`76b7289`](https://github.com/ramsayleung/rspotify/commit/76b7289a7861c4da206434443d52db954a1b30da) Now working! - [`585073b`](https://github.com/ramsayleung/rspotify/commit/585073b5c02a2ae083e9b61c2ebdea8730ee5116) Fix tests - [`c8af69b`](https://github.com/ramsayleung/rspotify/commit/c8af69bc3bb132a3e692a6e28a2d621e9069983e) Testing token refreshing - [`c67aca5`](https://github.com/ramsayleung/rspotify/commit/c67aca5d14763bf157f9f0856ea988bcf15943d5) update changelog ### 📊 Changes **13 files changed** (+284 additions, -179 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `Cargo.toml` (+1 -0) 📝 `examples/auth_code.rs` (+4 -7) 📝 `examples/auth_code_pkce.rs` (+25 -14) 📝 `examples/client_creds.rs` (+4 -3) 📝 `rspotify-model/src/auth.rs` (+31 -1) 📝 `src/auth_code.rs` (+26 -26) 📝 `src/auth_code_pkce.rs` (+71 -34) 📝 `src/client_creds.rs` (+7 -2) 📝 `src/clients/base.rs` (+19 -21) 📝 `src/clients/mod.rs` (+3 -47) 📝 `src/clients/oauth.rs` (+2 -2) 📝 `src/lib.rs` (+90 -22) </details> ### 📄 Description ## Description This implements the PKCE auth flow. It also removes quite a few TODOs in the code. Closes #150 ## Dependencies I had to add `sha2` in order to hash the verifier code with SHA256. ## Type of change Please delete options that are not relevant. - [x] New feature (non-breaking change which adds functionality) - [x] Breaking change (fix or feature that would cause existing functionality to not work as expected) ## How Has This Been Tested? * The `examples/auth_code_pkce.rs` example --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:24:19 +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/rspotify#339
No description provided.