Guest User

Untitled

a guest
Feb 24th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. firebase.initializeApp(config);
  2. const db = firebase.firestore();
  3.  
  4. const googleSignIn = async () => {
  5. return await Expo.Google.logInAsync({
  6. androidClientId,
  7. iosClientId,
  8. scopes: ['profile', 'email'],
  9. });
  10. };
  11.  
  12. const firebaseLogin = async (accessToken) => {
  13. const cred = firebase.auth.GoogleAuthProvider.credential(null, accessToken);
  14. await firebase.auth().signInWithCredential(cred).catch(console.error);
  15. const idToken = await firebase.auth().currentUser.getIdToken(true).catch(console.error);
  16. };
Add Comment
Please, Sign In to add comment