在register/login之前检查email是否可以用于auth0认证

Check if email can be used for auth0 authentication before register/login

想象一个基于邀请的服务,它只允许特定的电子邮件地址注册然后登录。

作为开发人员,我想在身份验证过程的一开始就为用户提供一个简单的单输入表单。用户仅提供电子邮件地址,如果电子邮件在白名单上,则向用户提供注册或登录表单。

我的问题是如何存储电子邮件白名单并在访问 auth0 中的 login/register 表单之前验证电子邮件是否可以发送到 login/register?

请参阅 https://auth0.com/docs/design/creating-invite-only-applications,其中提供了仅受邀流程的说明。

Many SaaS apps allow self-service provisioning, where users can register themselves and begin using the app. Other types of apps, however, do not allow such signups. Instead, the customer (typically an organization of some type) pay upfront for a number of users, and only the end user with the appropriate credentials may sign up and access the app. In such cases, you can use an invite-only workflow for authorization purposes.