gpt4 book ai didi

oauth-2.0 - 使用 Ionic Framework 开发的移动应用程序应该使用哪个 OAuth 流程?

转载 作者:行者123 更新时间:2023-12-03 16:14:31 24 4
gpt4 key购买 nike

使用 Ionic Framework 开发的移动应用程序应该使用哪个 OAuth 流程?

我正在使用 Ionic Framework v3 开发移动应用程序。它将使用 REST 调用与我的授权服务器 (www.example.com) 进行交互。为了使 REST 调用更安全,我引入了 OAuth 和 JWT。但我无法决定使用哪个 OAuth 流。

另请注意,我将使用自己的 OAuth 服务器,不会使用 Facebook、Google 等公共(public)服务器。

最佳答案

我的理解是,这取决于您是将 Ionic 应用程序部署为 Web 应用程序还是 native 应用程序。对于 Web (SPA),您可能会使用隐式流程,而对于 Native,您可能会使用使用 Proof Key for Code Exchange - PKCE 的授权代码授予。

我个人使用 Auth0 进行身份验证,并将我的 Ionic 应用程序部署在 Web 和 Native 中。我的应用程序在 Web 和 PKCE for Native 中触发隐式流。 Auth0 在这里有一些有用的文档:

  • https://auth0.com/docs/api-auth/which-oauth-flow-to-use
  • https://auth0.com/docs/api/authentication#implicit-grant
  • https://auth0.com/docs/api/authentication#authorization-code-grant-pkce-
  • 关于oauth-2.0 - 使用 Ionic Framework 开发的移动应用程序应该使用哪个 OAuth 流程?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50628392/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com