国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Firebase JS SDK ?? React-Native-Firebase? ???? ????
P粉083785014
P粉083785014 2023-09-02 18:27:28
0
1
770
<p>Firebase? JS SDK? ???? ??? ? ?? ???? ??? React-Native ? Expo? ???? ??? ??? ???? ????. ?? Expo? ???? ??? RNFirebase? ???? ??? ???? ??? Expo Go? ???? ??? ?? ?????? ??????. <strong>? ??: React-Native-Firebase ??? ??? ?? Google ??? ??

<p>npm</p>? ???? "react-native-firebase/app" ? "react-native-firebase/auth"? ??????. <p>??? Google? ??? ??(https://rnfirebase.io/auth/social-auth)? ????? ?? '[DEFAULT]' Firebase ?? ????? ???? ??? ???? ?????. </p> <p>??? ?? ?? ???? ? ? ??????? ??? firebase.js ??? ????? ?? ???(???? ??????)? ?????. </p> <pre class="brush:php;toolbar:false;">'@react-native-firebase/app'?? Firebase ????; '@react-native-firebase/auth'?? ??? ?????. // Firebase JS SDK v7.20.0 ??? ?? ?? ID? ???????. const firebaseConfig = {apiKey: "AIzaSyCoNUZI0-Mir9hGtXUJJmIrML88JxSOJAk",authDomain: "campus-market-25068.firebaseapp.com",databaseURL: "https://campus-market-25068-default-rtdb.firebaseio.com",projectId: "campus-market-25068",storageBucket: "campus-market-25068.appspot.com",messagingSenderId: "315015080294",appId: "1:315015080294:web:53dbed097963d67b92c0a7",measurementId: "G-5TVXC2MQ7S "} ;if (!firebase.apps.length) {firebase.initializeApp(firebaseConfig);}export { firebase, auth }</pre> <p>?? ??? ????? ?? RNFirebase? ???? ??? ??? Firebase? JS SDK? ???? ??? ??????.???? ??? ??? ? ???? ? ?? ??? ??? ????. </p> <pre class="brush:php;toolbar:false;">'expo-dev-client' ???? '??'?? ???? { useState, useEffect }; 'expo-status-bar'?? { StatusBar }? ?????. import { StyleSheet, Text, View, Button } from 'react-native'; // './src/firebase' ????;/ /import * '@react-native-firebase/app'?? Firebase?; import { auth } from './firebase'; '@react-native-google-signin/google-signin'?? { GoogleSignin }? ?????. ?? ?? ???? App() { GoogleSignin.configure({ webClientId: '315015080294-gejpuoaedqhbcve32dat55gg4cn5va3j.apps.googleusercontent.com', }); GoogleButtonPress()? ??? ?? { // ??? Google Play? ????? ?????. GoogleSignin.hasPlayServices({ showPlayServicesUpdateDialog: true })? ?????. // ???? ID ??? ?????. console.log(GoogleSignin); const { idToken } = GoogleSignin.signIn()? ?????. const googleCredential = auth.GoogleAuthProvider.credential(idToken); // ?? ??? ???? ??? ??? return auth().signInWithCredential(googleCredential);// console.log("YOOOOOOOO5")// console.log(res)} ?? ( <View style={styles.container}><Text>App.js? ?? ?????? ??? ?????! </Text><StatusBar style="auto" /><Button title="Google ???" onPress={() => onGoogleButtonPress().then(() => console.log('?? ?? ???! '))}/></??>);}) ) const styles = StyleSheet.create({container: {flex: 1, backgroundColor: '#fff',alignItems: 'center',justifyContent: 'center',},});</pre> <p>???? ???? ?? ??????</p>
P粉083785014
P粉083785014

?? ??(1)
P粉682987577

? ?? ???? auth().signInWithCredential ,你仍然在使用 react-native-firebase ?????? ?????:

???

Firebase JavaScript SDK??? firebase.auth().signInWithCredential 或者 signInWithCredential(auth, ...? ? ????.