我做了一个react-native
项目。我正在使用Google Firebase身份验证。但是,当我使用Google帐户登录时,收到了开发人员错误。
顺便说一句关于授权的消息正在发送到我的电子邮件中
我已经研究并在我的debug.keystore
中发现了麻烦。我ve added my
sha1到Firebase控制台的键,但是错误仍然存在。
HomeScreen.js:39 Message Error: DEVELOPER_ERROR
at createErrorFromErrorData (NativeModules.js:146)
at NativeModules.js:95
at MessageQueue.__invokeCallback (MessageQueue.js:414)
at MessageQueue.js:127
at MessageQueue.__guard (MessageQueue.js:314)
at MessageQueue.invokeCallbackAndReturnFlushedQueue (MessageQueue.js:126)
at debuggerWorker.js:72
这是我的身份验证方法:
_signIn = async () => {
//Prompts a modal to let the user sign in into your application.
try {
await GoogleSignin.hasPlayServices({
//Check if device has Google Play Services installed.
//Always resolves to true on iOS.
showPlayServicesUpdateDialog: true
});
const userInfo = await GoogleSignin.signIn();
console.log("User Info --> ", userInfo);
this.setState({ userInfo: userInfo });
} catch (error) {
console.log("Message", error);
if (error.code === statusCodes.SIGN_IN_CANCELLED) {
console.log("User Cancelled the Login Flow");
} else if (error.code === statusCodes.IN_PROGRESS) {
console.log("Signing In");
} else if (error.code === statusCodes.PLAY_SERVICES_NOT_AVAILABLE) {
console.log("Play Services Not Available or Outdated");
} else {
console.log("Some Other Error Happened");
}
}
};
我想我的sha1
键或Android Studio设置有问题。
如何解决?