Skip to content
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

How can i get access-token with omniauth on React Native app #889

Closed
13LD opened this issue May 16, 2017 · 2 comments
Closed

How can i get access-token with omniauth on React Native app #889

13LD opened this issue May 16, 2017 · 2 comments

Comments

@13LD
Copy link

13LD commented May 16, 2017

i'm using this gems for auth with google and facebook:
omniauth-facebook
omniauth-google-oauth2
devise_token_auth
This stack works correctly with angular but not with react_native. After successfully authorization with facebook and google returns nothing, how can i fix that?

@lynndylanhurley
Copy link
Owner

I ran into this issue as well. There was some kind of bug that only seemed to affect the access-token header, it was really strange.

I was using superagent and was able to find the access-token header nested in xhr.responseHeaders in the response.

So for example:

// ...
request.end(async (err, resp) => {
  const { xhr: { responseHeaders }, body, status } = resp;
  const accessToken = responseHeaders['access-token'];
}

This was some time ago and the bug may have been fixed since then.

Closing because this is 100% a react-native problem.

@13LD
Copy link
Author

13LD commented Jul 31, 2017

thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants