Fix: Encrypted refresh tokens containing '+' were being incorrectly encoded#70
Closed
Mohamad-Kredly wants to merge 0 commit intoPeter-Schorn:masterfrom
Closed
Fix: Encrypted refresh tokens containing '+' were being incorrectly encoded#70Mohamad-Kredly wants to merge 0 commit intoPeter-Schorn:masterfrom
Mohamad-Kredly wants to merge 0 commit intoPeter-Schorn:masterfrom
Conversation
Owner
|
Hi Mohamad, Thanks for bringing this issue to my attention. You are, indeed, correct that |
Owner
|
Just pushed version 4.0.1, which should fix this issue by properly percent-encoding the |
Author
|
Just got around to testing your fix and it works, thanks! |
1364151 to
29329ba
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed an issue where an encrypted refresh token containing the '+' symbol would be sent as a space instead, failing the refresh.
Context:
I was using the SpotifySDK to auth based off of the example project and I was having problems where sometimes the token fails to refresh when using the AuthorizationCodeFlowBackend's refresh. Refreshing with the SessionManager didn't have any issues so I looked at the backend and I saw that the token sent from SpotifyAPI was being decoded as a space instead of the +.
The backend used is the one in the SpotifySDK demo projects:
https://github.com/spotify/ios-sdk/blob/master/DemoProjects/spotify_token_swap.rb
I'm unsure if this occurs on other servers and if this is instead a fault from the backend I'm using 😅