简体   繁体   English

Expo 裸工作流谷歌登录身份验证错误

[英]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_urinull:/oauth2redirect/google )不好,

your need to follow those instructions:您需要遵循这些说明:

  • Bundle ID : Must match the value of ios.bundleIdentifier in your app.json. Bundle ID :必须与ios.bundleIdentifier中的 ios.bundleIdentifier 的值匹配。
  • Your app needs to conform to the URI scheme matching your bundle identifier.您的应用程序需要符合与您的包标识符匹配的 URI 方案。
    • Bare workflow: Run npx uri-scheme add <your bundle id> --ios裸工作流:运行npx uri-scheme add <your bundle id> --ios
  • To test this you can:要对此进行测试,您可以:
    1. Eject to bare: expo eject and run yarn ios弹出到裸线: expo eject并运行yarn ios
    2. Create a custom client: expo client:ios创建自定义客户端: expo client:ios
    3. Build a production IPA: expo build:ios构建生产 IPA: expo build:ios
  • Whenever you change the values in app.json you'll need to rebuild the native app.每当您更改 app.json 中的值时,您都需要重新构建本机应用程序。

source资源

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.

相关问题 expo 裸工作流不能使用nativemodule - expo bare workflow can't use nativemodule 如何在从博览会裸工作流构建 iOS 应用程序时修复错误 - How to fix error while building iOS app from expo bare workflow 带有 React-native (expo) 的 IOS 版 Google 登录 - Google SignIn for IOS with React-native (expo) iOS/Expo:弹出到裸工作流后无法在物理设备上构建 - iOS/Expo: Can't build on physical device after ejecting to bare workflow 如何在 IOS 设备上的裸工作流中测试我的博览会应用程序? - How can i test my expo app in bare workflow on IOS device? iOS在Google SignIn React Native Expo 32上崩溃 - IOS crashes on Google SignIn React Native Expo 32 在裸 React Native 项目中安装 expo 后生成错误 (IOS) - Build Error (IOS) after installing expo in a bare React Native Project 出现来自应用程序委托的错误-Google登录 - Presenting An Error from App delegate — Google Signin 我需要在我的个人设备上测试我的 React Native 应用程序(作为裸工作流从 Expo 中弹出)。 如何在我的 iPhone 上构建和部署它? - I need to test my React Native app (Ejected from Expo as Bare Workflow) on my personal device. How do I build it and deploy on my iPhone? 从google plus signin重定向到iOS应用程序后出现错误 - Getting Error after redirecting to iOS app from google plus signin
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM