我正在使用Social Auth!插件以使用Firebase与google登录,并且按照文档执行了所有步骤。 我的代码是:
import { GoogleSignin } from 'react-native-google-signin';
import firebase from 'react-native-firebase'
export async function googleLogin() {
try {
// add any configuration settings here:
await GoogleSignin.configure();
const data = await GoogleSignin.signIn();
// create a new firebase credential with the token
const credential = firebase.auth.GoogleAuthProvider.credential(data.idToken, data.accessToken)
// login with credential
const firebaseUserCredential = await firebase.auth().signInWithCredential(credential);
console.warn(JSON.stringify(firebaseUserCredential.user.toJSON()));
} catch (e) {
console.error(e);
}
}
当我在android设备上运行应用程序时, react native调试器向我显示此错误:
Uncaught (in promise) TypeError: Cannot read property 'concat' of undefined
at DeltaPatcher.applyDelta (DeltaPatcher.js:77)
at deltaUrlToBlobUrl (deltaUrlToBlobUrl.js:28)
如果我做错了事,请告诉我。或react-native插件有问题