-
-
Notifications
You must be signed in to change notification settings - Fork 591
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
OAuthSwift returns "The operation couldn’t be completed. (OAuthSwiftError error -10.)". #307
Comments
I don't understand why you can see only error code, I implement OAuthSwiftError error -10 -> retain, see https://github.com/OAuthSwift/OAuthSwift/blob/master/Sources/OAuthSwiftError.swift You must retain your oauthSwift object somewhere, have a head reference on it |
Where would it need to be stored if it is a retain problem. Or should it be a var? |
yes a you authorise only one time |
I was able to get it to work. I looked at the demo view controller example and saw you had an instance variable for retaining the oauthswift object. I set it after creating a OAuthSwift object in my class for handling social auth. |
Out of curiosity, could it cause a retain cycle? |
No. You must retain it because we do the maximum to not retain anything internally (and our |
Now I am getting a new issue. When getting the oauthcode in the redirect, this is what it looks like: |
Actually figured out its the access token. But is there still a way to get the code thats in the redirect URL? |
a new topic, a new issue code is just a temporary var to request then the oauth token using url accessTokenUrl |
Description:
When logging in with Facebook, I am able to get the redirect url with the oauthtoken. I have a custom view controller that I set to my instance of OAuthSwift as the authorizeURLHandler. In the custom view controller, I implemented the UIWebViewDelegate method for
shouldStartLoadWith
where I check for the redirect URL. I then pass the URL intoOAuthSwift.handle()
. After doing this, I get this error message from OAuthSwift: "The operation couldn’t be completed. (OAuthSwiftError error -10.)". What does this mean and what am I'm doing wrong to get this error?OAuth Provider (Twitter, Github, ..):
Facebook
OAuth Version:
OS (Please fill the version) :
Installation method:
Library version:
Xcode version:
8.0 (Swift 3.0)
8.0 (Swift 2.3)
7.3.1
other: (Please fill in the version you are using.)
objective c
Code Sample
Here is my custom web vie controller for handling the login.
The text was updated successfully, but these errors were encountered: