Open ajonno opened 7 years ago
Any help is appreciated we're on a bit of a tight deadline with this one
@ajonno You should be able to register with the token: https://github.com/fullstackreact/react-native-firestack#signinwithprovider
i did try that with Facebook and was fine/works.
but Google didnt like the access_token. ill double back to post the error response here shortly
here is the error:
here is the code block. i suspect im missing a param somewhere?
manager.authorize('google', {scopes: 'profile email'})
.then(resp => {
console.log('GOOGLE authorize response: ', resp)
firestack.signInWithProvider('google', resp.response.credentials.access_token, '') // facebook need only access token.
.then((user)=>{
console.log('(FIRESTACK) GOOGLE AUTH response:', user)
})
.catch(err => console.log(err));
})
.catch(err => console.log(err));
+1 same issue for me as well
Found the Solution. change resp.response.credentials.access_token to resp.response.credentials.idToken
https://github.com/fullstackreact/react-native-firestack/issues/130
https://gist.github.com/auser/87e6a25da0b25c465dd0db097b8864ca#file-firebase_google_login-js-L108
I need a bit of help with this one. I've implemented react-native-oauth (iOS) for Google auth, and its returning a payload, all is good there.
what I cant work out now is how do i "tie" that into Firebase, so that i can complete things and register/create the user on Firebase ? the response payload from ..-auth0 has 'credentials' and 'access-token' that I can see. can i use that to then authenticate with Firebase (Im using the Firestack lib :-)