Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

manage.authorize promise is not resolved or rejected #41

Closed
Aaronius opened this issue Jan 15, 2017 · 5 comments
Closed

manage.authorize promise is not resolved or rejected #41

Aaronius opened this issue Jan 15, 2017 · 5 comments

Comments

@Aaronius
Copy link

I followed the readme except for when I enabled Keychain Sharing Entitlement in Capabilities I got an error icon next to "Add the Keychain Sharing feature to your App ID" and a message under it saying "Failed to create provisioning profile". Anyway, I was (possibly incorrectly) hoping I could ignore it and see if I could get further into my prototype. I got the rest of the setup done but when my code executes manager.authorize, the resulting promise never gets resolved or rejected. I don't get any kind of error in the debugging console and I don't see requests go to Twitter in the network tab.

My code looks like this:

const manager = new OAuthManager('peoplewatch');
    manager.configure(config);
    manager.authorize('twitter')
      .then((response) => {
        console.log(response);
      })
      .catch((err) => {
        console.log(err);
      });

I tried debugging deeper into the authorize code but it got to where it queues up the call to the native code and lost me after that. Could this be a bug or am I missing something? Thanks!

@auser
Copy link
Contributor

auser commented Jan 15, 2017

Yes, what version are you using? Try passing a second argument. Does that fix it?

@Aaronius
Copy link
Author

I was trying with 2.1.11. I just tried 2.1.13 with and without a second argument and the promise is still not resolved or rejected. I'm not sure what to pass as a second argument though. I just passed an empty object.

@woomike
Copy link

woomike commented Jan 17, 2017

I'm having the same issue but with Google Oauth. I am able to allow access to the app, but google does not redirect me back into the app and the promise never resolves.

@FrenchBully
Copy link
Contributor

I was able to get it working for Google. Looks like the only scope I'm able to pass is 'email'. The url to pass as an argument for manager.makeRequest is 'https://www.googleapis.com/plus/v1/people/me'

@auser
Copy link
Contributor

auser commented Jan 17, 2017

Closing in favor of #42. You need to make sure you have the app set up properly. I'll add a checklist on the README to discuss this.

@auser auser closed this as completed Jan 17, 2017
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants