mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 20:55:57 +03:00
[GH-ISSUE #51] Setting the Callback URL in the app #33
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#33
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 @nabil-takla on GitHub (Apr 12, 2015).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/51
I'm new to Xcode and I'm not sure how to set the Callback URL for the Linkedin app in the Linkedin web page or in the Demo app [oauthswift.authorizeWithCallbackURL( NSURL(string: "oauth-swift://oauth-callback/linkedin")!, scope: "r_fullprofile", state: "", success: { ]. I'd appreciate your help!
@gabriel-jones commented on GitHub (Apr 12, 2015):
As shown in the demo:
@nabil-takla commented on GitHub (Apr 12, 2015):
Thanks Gabriel for your quick reply. OAuth1Swift works but OAuth2Swift does not. The following is the code:
———————
//
println(linkedinProfile)
self.performSegueWithIdentifier("businessCard", sender: nil)
———————————
OAuth2Swift is commented out.
What is the proper URL that I should supply in the Linkedin app web page for "OAuth 2.0 Redirect URLs"?
Nabil
@gabriel-jones commented on GitHub (Apr 12, 2015):
What do you mean by it doesn't work? Do you get an error from LinkedIn, or does it not respond?
According to the OAuth2 Documentation for LinkedIn your request needs: response type, client id, redirect uri, scope, and state. The scope, I'm guessing you just need to say
r_fullprofile. The state can be any random string, just make something up. The documentation also mentions a redirect url, but this should be handled by the library -- it will not have to redirect to a webpage, but will return to your app. The redirect url is actually just the callback url, which isoauth-swift://oauth-callback/linkedinP.S. to do multi-line comments in Xcode, instead of doing lots of
//s for each line, you can write:@nabil-takla commented on GitHub (Apr 13, 2015):
Thanks. No, it doesn't work. When I use: "oauth-swift://oauth-callback/linkedin", I get an error in Linkedin: "URLs must be http or https"
@gabriel-jones commented on GitHub (Apr 13, 2015):
Sorry, I do not know what URL to use. You can directly email the creator of the library: dongri.at@gmail.com
@Ramya797 commented on GitHub (Apr 23, 2015):
I have the same problem for redirect linked URI .. is there a solution ? please let me know
I am using this : oauth-swift://oauth-callback/linkedin but on simulator I get " invalid redirect URI"
@nabil-takla commented on GitHub (Apr 26, 2015):
Dongri Jin recommended this: https://github.com/dongri/oauthswift.herokuapp.com. It works for me.
@Sudhir007 commented on GitHub (Sep 14, 2015):
How to implement this https://github.com/dongri/oauthswift.herokuapp.com. in my project ?
@phimage commented on GitHub (Sep 29, 2015):
@nabil-takla please close this github issue if "it works for" you
@ofix-Parul commented on GitHub (Feb 9, 2024):
@nabil-takla did you find the answer to this: "What is the proper URL that I should supply in the Linkedin app web page for "OAuth 2.0 Redirect URLs"?"