mirror of
https://github.com/ramsayleung/rspotify.git
synced 2026-04-25 23:45:52 +03:00
[PR #420] [MERGED] Fix pkce #443
Labels
No labels
Stale
bug
discussion
enhancement
good first issue
good first issue
help wanted
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/rspotify#443
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?
📋 Pull Request Information
Original PR: https://github.com/ramsayleung/rspotify/pull/420
Author: @jacobmichels
Created: 5/30/2023
Status: ✅ Merged
Merged: 5/30/2023
Merged by: @ramsayleung
Base:
master← Head:fix-pkce📝 Commits (5)
c544786bump base64 to latestb3ac7e3fix usage of deprecated api4360c09properly encode challenge code77fae78changelog entrycb0885fchange encoding alphabet📊 Changes
4 files changed (+9 additions, -3 deletions)
View changed files
📝
CHANGELOG.md(+3 -0)📝
Cargo.toml(+1 -1)📝
src/auth_code_pkce.rs(+3 -1)📝
src/lib.rs(+2 -1)📄 Description
Description
This PR fixes the PKCE auth flow panicking during
prompt_for_token. The issue was the challenge code was being base64 encoded in a url-unsafe manner. This PR simply changes the base64 encoding logic to be url safe.I also bumped the base64 crate version and updated lib.rs to avoid using a deprecated base64 encode API.
#419
Motivation and Context
I wanted to use PKCE auth.
Dependencies
No dependencies added. base64 bumped from 0.20.0 to 0.21.2
Type of change
Please delete options that are not relevant.
How has this been tested?
I didn't do any automated testing, I just ran the auth_code_pkce example to check if my changes worked. On version 0.11.7 this example panics. With my patch, the example functions as expected.
Is this change properly documented?
I added an entry to the changelog. I don't believe further documentation is needed.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.