mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 12:45:52 +03:00
[GH-ISSUE #110] Foursquare authentication failing #67
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#67
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 @nmorenor on GitHub (Sep 23, 2015).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/110
Hi, I'm using OAuthSwift library on a project, and while doing Foursquare authentication I found something interesting inside the file OAuth2Swift.swift, when calling authorizeWithCallbackURL function I see that the returned url has both a query string and a fragment, it will be something like.
https://somehost/somepath?access_token=${atoken}#=
and because of that the responseParameters lose the access_token value with the code:
Cheers
Ignacio
@phimage commented on GitHub (Sep 24, 2015):
There is a difference between Oauth1 and Oauth2 here
Oauth1 does'nt have this problem because there is an
elsebetween query and fragmentThis is a solution to fix OAuth2, just add the
elseto choose onlyqueryif there is query and fragmentbut we can also merge ? I make a PR for that : PR #111
PR can be closed if first solution is choosen
@nmorenor commented on GitHub (Sep 24, 2015):
Is that the right thing to do?, or perhaps it could be better to concatenate both dictionaries :)
@phimage commented on GitHub (Sep 24, 2015):
merge = concatenate, my second solution in my pull request
dongri will choose the right one if he has time ;)