mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 12:45:52 +03:00
[GH-ISSUE #492] OAuth1 Authorize encoding issue #324
Labels
No labels
bug
cocoapod
duplicate
enhancement
feature-request
help wanted
help wanted
invalid
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/OAuthSwift#324
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?
Originally created by @smoroden on GitHub (Sep 14, 2018).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/492
Originally assigned to: @phimage on GitHub.
Description:
I am trying to get OAuth1 integrated to a third party but there is an issue where the oauth_token is rejected during the Authorize call whenever it has a
+in it. eg.GET /OAuth/Authorize?viewmode=mobile&oauth_token=SyiIELHYmK2czfntI7hy+Gs7aqU=&fromSignIn=true HTTP/1.1Looking at the RFC it says that
OAuth1Swift.swift:99 shows how we encode when creating the Authorize url:
urlQueryEncodedusesCharacterSet.urlQueryAllowedwhich does not encode+characters.It seems to me that it should instead be using the
urlEncodedseen in String+OAuthSwift.swift:19 in order to comply with the RFC specifications.I have tested doing just that and the Authorize calls work great all of the time.
I haven't run into this issue before for numerous OAuth integrations so I am also wondering if it is just something different with the third-parties implementation?
OAuth Provider? (Twitter, Github, ..):
Private third party
OAuth Version:
OS (Please fill the version) :
Installation method:
Library version:
Xcode version:
9.3 (Swift 4.1)
9.0 (Swift 4.0)
9.0 (Swift 3.2)
8.x (Swift 3.x)
8.0 (Swift 2.3)
7.3.1
other: (Please fill in the version you are using.)
objective c
@phimage commented on GitHub (Sep 17, 2018):
Thanks you for the detailed report
I think you are right regarding of the RFC.
I want to fix that, but I must test with some server (and difficult to know if they provide sometime token with this characters, so a banal unit test will never really test that)
...Sometimes server and client make mistake, that's why there is some configuration boolean in OAuthSwift to be compatible with some server.
@phimage commented on GitHub (Jun 10, 2019):
I make an option on
OAuthSwift1,useRFC3986ToEncodeTokento set to true to useurlEncodedIf It could help someone with one server