Last active
April 3, 2020 15:47
-
-
Save asumansenol/4603a6d62795136a06ee2be728cbd181 to your computer and use it in GitHub Desktop.
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
signInWithGoogleAsync = async () => { | |
try { | |
const result = await Google.logInAsync({ | |
androidClientId: ANDRIOID_CLIENT_ID, | |
iosClientId: IOS_CLIENT_ID, | |
behavior: 'web', | |
iosClientId: '', //enter ios client id | |
scopes: ['profile', 'email'] | |
}); | |
if (result.type === 'success') { | |
this.onSignIn(result); | |
return result.accessToken; | |
} else { | |
return { cancelled: true }; | |
} | |
} catch (e) { | |
return { error: true }; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment