Created
February 1, 2018 05:23
-
-
Save roshangm1/c8cec6f9da04919d1abbc7ce5f9be911 to your computer and use it in GitHub Desktop.
Login Bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
loginWithFb = () => { | |
manager.deauthorize('facebook') | |
manager.authorize('facebook', {scopes: 'email'}) | |
.then((resp) => { | |
console.log(resp); | |
const accessToken = (Platform.OS === 'ios') ? resp.response.credentials.accessToken : resp.credentials.accessToken | |
this.sendFbTokenToServer(accessToken, 'facebook') | |
}); | |
} | |
loginWithGoogle = () => { | |
manager.deauthorize('google') | |
manager.authorize('google', {scopes: 'email'}) | |
.then((resp) => { | |
console.log(resp) | |
const accessToken = (Platform.OS === 'ios') ? resp.response.credentials.accessToken : resp.credentials.accessToken | |
this.sendFbTokenToServer(accessToken, 'google') | |
}) | |
.catch(err => { | |
console.error(err); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment