单点登录 (SSO)

了解你的组织如何使用身份提供者来管理团队中的 Expo 用户。


单点登录(SSO)适用于生产和企业计划客户。

🌐 Single Sign-On (SSO) is available for Production and Enterprise plan customers.

要开始,请为 Expo SSO 准备你的身份提供者 (IdP),并按照以下你的 IdP 配置指南 收集信息。完成此操作后,你的组织所有者可以按照说明启用 SSO

🌐 To get started, prepare your identity provider (IdP) for Expo SSO and gather information by following the configuration guide for your IdP below. Once you have done this, an owner of your Organization can follow instructions to enable SSO.

如果你有任何问题或遇到困难,请联系我们,我们将帮助你建立你的组织。

🌐 If you have questions or issues, contact us and we'll help you set up your organization.

身份提供商支持

🌐 Identity provider support

Expo SSO 支持以下身份提供商:

🌐 Expo SSO supports the following identity providers:

我们实现了 OpenID Connect Discovery 1.0 规范,并正在努力验证更多兼容的身份提供者。如果你使用其他身份提供者并对 SSO 感兴趣,请告诉我们

🌐 We implement the OpenID Connect Discovery 1.0 specification and are working to verify additional compatible identity providers. If you use another identity provider and are interested in SSO, let us know.

在组织上设置 SSO

🌐 Setting up SSO on an organization

组织账户必须至少保留一个具有所有者角色的非 SSO 用户。该用户在初始 SSO 设置时是必需的,并且可以确保在 SSO 配置变更或停止使用 SSO 时仍能不间断访问你的组织。

1

以组织账户所有者身份登录。在你的账户 EAS 仪表板中,转到 设置 > 组织设置 > 为账户创建 SSO 配置

🌐 Log in as the Organization account owner. In your account's EAS dashboard, go to Settings > Organization settings > Create SSO configuration for account.

2

为账户创建 SSO 配置 上,点击 开始 按钮。

🌐 On Create SSO configuration for account, click the Start button.

3

使用在 IdP 设置期间收集的信息输入你的 IdP 配置详细信息:

🌐 Enter the configuration details for your IdP using the information you collected during the IdP setup:

  • 客户ID
  • 客户端密钥
  • IdP 子域/租户 ID(如需)。点击发行者字段上方的 ? 图标获取输入内容的帮助。

4

点击 创建 SSO 配置

🌐 Click Create SSO Configuration.

5

组织设置 > 概览 页面现在将显示 更新 SSO 配置 选项。若客户端密钥有所更改,请使用此选项进行更新。

🌐 The Organization settings > Overview page will now display an Update SSO configuration option. Use this option to update the client secret if it changes.

单点登录用户登录

🌐 SSO user sign in

博览会网站

🌐 Expo website

1

导航到 expo.dev/sso-login 并输入你组织的账户名称。你可以创建一个链接来预填组织名称。例如,expo.dev/sso-login/test-org 会预填 test-org

🌐 Navigate to expo.dev/sso-login and enter the account name of your organization. You can create a link that pre-fills the organization name. For example, expo.dev/sso-login/test-org pre-fills test-org.

2

登录到你的身份提供商(IdP)。

🌐 Log in to your identity provider (IdP).

3

系统会提示你选择一个 Expo 用户名。这将作为你的 Expo 账户用户名。

🌐 You'll be prompted to select an Expo username. This will be the username for your Expo account.

Expo CLI

使用 Expo CLI 时,你可以运行以下命令来登录你的 Expo 账户。

🌐 When using the Expo CLI, you can run the following command to log in to your Expo account.

Terminal
npx expo login --sso

你将被提示通过浏览器在 Expo 网站上登录,登录完成后将重定向回命令行接口。

🌐 You will be prompted to log in via the Expo website in a browser and will be redirected back to the CLI upon completion.

EAS 命令行接口

🌐 EAS CLI

使用 EAS CLI 时,你可以运行以下命令登录你的 Expo 账户。

🌐 When using the EAS CLI, you can run the following command to log in to your Expo account.

Terminal
eas login --sso

你将被提示通过浏览器在 Expo 网站上登录,登录完成后将重定向回命令行接口。

🌐 You will be prompted to log in via the Expo website in a browser and will be redirected back to the CLI upon completion.

Expo

🌐 Expo Go

1

在登录流程中,在登录页面点击 使用 SSO 继续 按钮。

🌐 Click the Continue with SSO button on the sign-in page when going through the sign-in flow.

2

按照上述步骤登录 Expo 网站。

🌐 Follow the above steps to sign in to the Expo website.

SSO 用户限制

🌐 SSO user restrictions

SSO 用户与普通用户类似。不过,有一些已知的例外情况:

🌐 SSO users are like regular users. However, there are a few known exceptions:

  • SSO 用户只能隶属于他们的 SSO 组织。同时,他们也无法创建额外的组织。
  • SSO 用户无法离开他们的 SSO 组织。这样做会删除他们的 SSO 用户。
  • SSO 用户无法登录 Expo 论坛。
  • SSO 用户无法为其个人账户订阅 EAS。

单点登录管理

🌐 SSO administration

新组织和现有组织都可以启用 SSO 作为登录选项。对于已有非 SSO 成员的组织,可以启用 SSO,然后将新成员引导到 SSO 登录页面,而现有用户继续使用他们当前的 Expo 凭证。为了支持外部贡献者,启用 SSO 的组织还允许通过电子邮件邀请额外的非 SSO 用户。

🌐 Both new organizations and existing organizations can enable SSO as a sign in option. Organizations with existing non-SSO members can enable SSO and then direct new members to the SSO sign-in page, while existing users continue to use their current Expo credentials. To support external contributors, SSO-enabled organizations also allow inviting additional non-SSO users via email.

将现有用户过渡到单点登录

🌐 Transitioning existing users to SSO

普通用户可以是一个或多个个人、团队和组织账户的成员,而 SSO 用户仅属于其组织账户。因此,现有用户不能直接转换为 SSO 用户。但是,已经是你组织成员的普通用户可以通过访问 SSO 登录页面 创建第二个用户。然后,可以将他们的普通用户从组织中移除。

🌐 Regular users may be a member of one or many personal, team, and organization accounts while SSO users belong exclusively to their organization account. Thus, existing users cannot be directly converted into SSO users. However, a regular user who's already a member of your organization may create a second user by going to the SSO login page. Then, their regular user can be removed from the organization.

要从使用普通 Expo 账户过渡到使用 SSO 账户,请按照以下步骤操作:

🌐 To transition from using a regular Expo account to an SSO account, follow these steps:

1

检查你是否已经在 expo.dev 登录。如果是,请先登出。

🌐 Check if you're already logged in at expo.dev. If so, log out.

2

前往 SSO 登录页面 并按照提示操作,例如输入你的组织名称、创建一个新的 Expo 用户名以及登录到你的身份提供商。

🌐 Go to the SSO login page and follow the prompts, such as entering your organization name, creating a new Expo username, and logging in to your identity provider.

3

默认情况下,你的新 SSO 用户将具有仅查看角色。如果你需要其他角色,请联系管理员或拥有者在 成员 设置中更新你的角色。

🌐 By default, your new SSO user will have the View Only role. If you need a different role, ask an Admin or Owner to update your role in Members settings.

4

运行 eas login --sso 在 CLI 上切换到你的新账户。

🌐 Run eas login --sso to switch to your new account on the CLI.

5

此时,管理员或所有者可以将你的旧用户从组织中移除。在 成员 设置中,组织成员列表会显示用户是 SSO 用户还是非 SSO 用户。管理员或所有者可以点击旧用户旁边的下拉菜单,然后点击 移除成员

🌐 At this time, the Admin or Owner can remove your old user from the organization. In Members settings, the list of organization members indicates whether a user is an SSO or non-SSO user. The Admin or Owner can click the dropdown next to the old user and click Remove member.

6

如果你不再需要旧的用户账户,请先退出新的 SSO 账户,然后登录旧账户并进入 用户设置。向下滚动并点击 删除账户请注意,这将删除旧账户下的所有项目。 这不会影响组织拥有的任何项目。

🌐 If you no longer need your old user account, log out of your new SSO account, then log in to your old account and go to User settings. Scroll down and click Delete Account. Note that this will delete any projects under your old user account. It will not affect any projects owned by the organization.

如果你希望在新的 SSO 用户账户上重用旧的用户名,你可以先登录旧用户,进入用户设置进行重命名,然后再创建你的 SSO 账户。或者,你也可以在删除旧用户后重命名你的 SSO 用户账户的 Expo 用户名。虽然 Expo 用户名必须唯一,但如果你的身份提供者上的电子邮件地址与旧用户的电子邮件地址相同,这是允许的。

移除 SSO 用户

🌐 Remove SSO users

如果有人已离开你的组织,请在你的身份提供商(IdP)中将其移除或禁用。根据你在 IdP 中配置的令牌刷新时长,被移除的用户随后将失去对其 Expo 账户的访问权限。
如果你希望提前移除他们,或者希望将他们移除以清理账户中的用户,可以在组织的 成员 设置页面进行操作:

🌐 If someone has left your organization, remove or disable them in your IdP. Depending on the token refresh duration you configured with your IdP, the removed user will subsequently lose access to their Expo account. If you wish to remove them ahead of that time or you wish to remove them to clean up users on your account, you may do so on the organization Members settings page:

1

2

点击要删除的成员旁边的下拉菜单,然后点击 删除 SSO 用户

🌐 Click the dropdown next to the member you wish to delete, and click Delete SSO user.

警告 这将删除他们的个人账户及其所有相关数据。你组织账户中的所有数据将不受影响。

更改计费或停止使用 SSO

🌐 Change billing or discontinue use of SSO

继续使用 SSO 需要一个有效的生产或企业计划。如你希望停止使用 SSO 或更改你的计划,请联系我们

🌐 An active Production or Enterprise Plan is required to continue using SSO. Contact us if you wish to discontinue the use of SSO or change your plan.

为了确保无论是否启用 SSO,都能不间断地访问你的组织,SSO 组织必须保留至少一名具有所有者角色的非 SSO 用户作为成员。

🌐 To ensure uninterrupted access to your organization whether or not SSO is enabled, SSO organizations must keep at least one non-SSO user with the Owner role as a member.

删除 SSO 组织

🌐 Delete SSO organization

一旦为组织配置了单点登录(SSO),账户删除必须由 Expo 团队手动进行。联系我们以获取帮助。

🌐 Once SSO is configured for an organization, account deletion must be done manually by the Expo team. Contact us for assistance.