跳转到内容

网页浏览器的 Apple 登录

配置 Web 登录并不简单。它比在 iOS 上设置 Sign in with Apple 更困难,但比在 Android 上设置 Sign in with Apple 更困难。

请按照此处的指南生成服务。

  1. 转到您的 Service ID 配置

    Apple Developer Portal 中,导航到 Identifiers > Services IDs 并点击您的 service ID。

  2. 配置 Sign in with Apple

    点击 Sign in with Apple 旁边的 Configure

    apple_dev_configure_login

  3. 添加 Return URLs

    点击 + 按钮添加新的 return URL。

    apple_dev_return_url_plus

  4. 添加 Return URLs

    Domains and Subdomains 中添加您的 Web 应用程序域名。

    然后,添加带有 https:// 前缀的域名以及您将调用 Apple Login 的路径。 例如,如果您的域名是 https://my-app.com,并且您将从 /login 调用 Apple Login,则应添加 https://my-app.com/login 作为 return URL。

    apple_dev_return_url_add

  5. 保存更改

    1. 点击 Next 按钮保存更改。
    2. 点击 Save 按钮保存更改。
  6. 您应该已准备好测试 JavaScript 登录。请注意,您无法从 localhost 进行测试。