firebase - Flutter - 可以在没有 firebase 的情况下使用 Google 登录吗?

标签 firebase authentication flutter dart

那里google_sign_in在 pub.dev 上打包,但是它提供的用于设置应用程序的链接指向 https://firebase.google.com/?platform=android ...

谢谢!

最佳答案

是的 !你可以。

  • 在云控制台中创建项目。
  • 创建 OAuth 2.0 clientId(通过使用包名称对其进行限制)
  • 下载 JSON 并将其放在 android->app 文件夹中,就是这样。
  • 执行 google_sign_in 包中的步骤而无需进入 firebase

    GoogleSignIn googleSignIn = GoogleSignIn(
    clientId:"xxxx.apps.googleusercontent.com");

  • clientId 是可选的 - 但在 flutter web 中是必需的

    另请参阅 flutter web google sign in without firebase

    关于firebase - Flutter - 可以在没有 firebase 的情况下使用 Google 登录吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57531535/

    相关文章:

    angularjs - 使用 firebase 获取当前用户的 Angular ?

    rest - 是否可以将 swagger API 从经过身份验证的来源导入到 APIM 中?

    asp.net-mvc - 在 Web 层之外获取当前的 Principal

    google-cloud-firestore - 使用 Flutter 和 Firestore 显示某些数据

    validation - 在Flutter小部件测试中,如何验证字段验证错误消息?

    ios - Firebase FCM主题-可以是已订阅用户的用户ID吗?

    ios - Swift Firestore 更新字段值

    ios - 在使用 firestore(firebase 云数据库)获取重复数据时

    html - 通过 SSL 登录到 servlet

    flutter : Could not find package "build_runner"