mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 20:55:57 +03:00
[GH-ISSUE #176] Scope with space symbol doesn't create NSURL #103
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#103
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 @leo150 on GitHub (Jan 22, 2016).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/176
Let's say we need to login into fitbit account with
profileandweightscopes. From docsscopefield is:But when we call
authorizeWithCallbackURLwith scope string "profile weight" than this part of code silently skips our url:if let queryURL = NSURL(string: urlString) { self.authorize_url_handler.handle(queryURL) }It would be nice to add some log message or replace all space delimiters in
urlString@leo150 commented on GitHub (Jan 22, 2016):
Duplicate of #156
@phimage commented on GitHub (Jan 22, 2016):
I think this is not a duplicate
I will call failure callback in this case
Scope must be encoded here
workaround for now, html encode yourself the scope, I think replace space with %20
@leo150 commented on GitHub (Jan 22, 2016):
@phimage, thanks for support!
Small sample of replacement if anyone needs:
@phimage commented on GitHub (Feb 9, 2016):
I just encode the query, not the full URL because of
NSCharacterSet.URLQueryAllowedCharacterSet()Also if there is problem to create te URL, failure callback will be called