[英]Expo bare workflow google signin auth error
Google SignIn was working fine in managed workflow but stopped working when ejected. Google 登录在托管工作流程中运行良好,但在弹出时停止工作。 react-native-unimodules is properly configured.
react-native-unimodules 配置正确。 All other configurations are exactly the same.
所有其他配置完全相同。 Getting following error.
出现以下错误。
Authorization Error授权错误
Error 400: Invalid_request invalid parameter value for redirect_uri: Missing authority: null:/oauth2redirect/google错误 400:Redirect_uri 的 Invalid_request 参数值无效:缺少权限:null:/oauth2redirect/google
ClientId is checked multiple times for confirmation.多次检查 ClientId 以进行确认。
Your redirect_uri
( null:/oauth2redirect/google
) isn't good,您的
redirect_uri
( null:/oauth2redirect/google
)不好,
your need to follow those instructions:您需要遵循这些说明:
ios.bundleIdentifier
in your app.json. ios.bundleIdentifier
中的 ios.bundleIdentifier 的值匹配。npx uri-scheme add <your bundle id> --ios
npx uri-scheme add <your bundle id> --ios
expo eject
and run yarn ios
expo eject
并运行yarn ios
expo client:ios
expo client:ios
expo build:ios
expo build:ios
You should check some point below:您应该检查以下几点:
1.iosclientId is correct? 1.iosclientId是否正确?
2.AccessToken should as this 2.AccessToken应该这样
const credential = firebase.auth.GoogleAuthProvider.credential(null, accessToken);常量凭证 = firebase.auth.GoogleAuthProvider.credential(null, accessToken); firebase.auth().signInWithCredential(credential)
firebase.auth().signInWithCredential(凭据)
//Note the first parameter null //注意第一个参数null
3.Add ClientID in Sign-in Method Firebase->Google->Enable->Safelist Client IDs.... -> paste ClientID into input-> Press 'Add'-> Done run yourProject 3.在登录方法 Firebase->Google->Enable->Safelist Client IDs 中添加 ClientID.... -> 将 ClientID 粘贴到输入中-> 按“添加”-> 完成运行 yourProject
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.