【问题标题】:Mobile app using Firebase or Cloud Endpoints authentication with Google App Engine backend使用 Firebase 或 Cloud Endpoints 身份验证和 Google App Engine 后端的移动应用
【发布时间】:2017-05-26 23:43:37
【问题描述】:

我正在使用 Google App Engine 中的后端开发一个移动应用程序 (Ionic)。此应用需要使用 Google 身份验证登录并与 Google App Engine (Python) 应用进行安全交换。

Google 展示了 2 种配置来实现这一点。

  1. 移动客户端 Firebase Google App Engine:

  1. 移动客户端 Cloud Endpoints App Engine:

在我当前的方法1 中,Ionic 应用程序能够登录到 Google 并与 Firebase 交换信息,Firebase 能够与 Google App Engine 交互,但我不确定如何让 Ionic 应用程序进行身份验证和与 Google App Engine 的安全交换。

我可以使用这种方法吗? 或者我是否需要使用 2 移动客户端 Cloud Endpoints App Engine

谢谢。

【问题讨论】:

    标签: google-app-engine ionic-framework google-cloud-platform firebase-authentication google-cloud-endpoints


    【解决方案1】:

    您使用第一种方法是正确的,因为它使您能够从 Firebase 基础架构及其附加功能中受益,如平台的 page 所述。

    现在,使用 Firebase 在 App Engine 上对用户进行身份验证tutorial 是根据您的第一个配置组装应用程序的绝佳示例。您可能需要查看服务器上的身份验证用户 section,以了解有关您的 Ionic 应用程序如何与 App Engine 服务器交互的更多详细信息。说明一旦您的用户通过添加的 Firebase 身份验证用户 interface(在您的 Ionic 应用程序上)登录,应用程序和服务器之间的通信将通过令牌处理,如 here 所述。

    第二种方法也是可能的,但您必须实现自己的身份验证机制或使用与Flask 类似的应用程序框架。所提供教程中的应用程序已经基于的框架。

    【讨论】:

      【解决方案2】:

      我也在为我的应用程序运行方法 1。

      登录后,您将在您的 Android 客户端上收到来自 Firebase 的身份验证令牌。

      接下来,您需要将此令牌传递给您的云端点。请参阅以下链接:

      Send Firebase Token from Android to Google Cloud Endpoints

      您必须在 Google App Engine 上验证令牌。请看:

      How do I secure my Google Cloud Endpoints APIs with Firebase token verification?

      请看

      Google Cloud Endpoints and user's authentication

      用于为您的 Cloud Endpoints 实施您自己的自定义身份验证器

      【讨论】:

        猜你喜欢
        • 2017-10-09
        • 2014-10-11
        • 1970-01-01
        • 2011-12-25
        • 2017-08-30
        • 1970-01-01
        • 1970-01-01
        • 2018-12-29
        • 2014-06-21
        相关资源
        最近更新 更多