-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't receive access_token #6
Comments
Hi, The redirect URL needs to be a callback to your app scheme, check the README instructions on how to setup your project https://github.com/raulriera/AuthenticationViewController/blob/master/README.md |
Still do not have an answer. Could anyone provide a workable example for Twitter, for example? |
I'm the creator of this library, I just said in the previous message what redirectURI to use. 🤔 |
Yep, thank you. Now I can authenticate, but after that it opens redirect_uri and code from AppDelegate: (authenticationViewController.authenticateWithCode(code)) doesn't retrieve. What am I doing wrong? Doesn't work even with Instagram... |
Can you provide some code example? |
Here you can find it: I just can't get what to use for URL Scheme in my case. |
// Before doing this, you should check the url is your redirect-uri before doing anything. Be safe :)
if let components = URLComponents(url: url, resolvingAgainstBaseURL: false), let queryItems = components.queryItems, let code = queryItems.first?.value { Have you checked that the URL you are getting here is the scheme you specified? Does it match the one you used in Instagram? |
Make you used |
Does it work correctly fro Twitter/Facebook or Google+ ?
Can't manage any of them.
Can anyone provide an example with those networks?
e.g. I have following url for twitter:
"https://api.twitter.com/oauth/authorize/?client_id=\(clientId)&scope=\(scopes.joined(separator: "+"))&redirect_uri=(redirectURI)&response_type=code"
accessTokenURL = https://api.twitter.com/oauth/access_token"
redirectURI = "https://www.google.com"
Then, I put my ClientID and Secret, but nothing works. I can login and do not receive my token after switching to redirectURL.
The text was updated successfully, but these errors were encountered: