身份
身份是一种与用户关联的认证方法。Supabase Auth 支持以下类型的身份:
🌐 An identity is an authentication method associated with a user. Supabase Auth supports the following types of identity:
- 电子邮件
- 电话
- OAuth
- SAML
一个用户可以有多个身份。匿名用户在将身份关联到自己的用户之前是没有身份的。
🌐 A user can have more than one identity. Anonymous users have no identity until they link an identity to their user.
用户身份对象 #
🌐 The user identity object
用户身份对象包含以下属性:
🌐 The user identity object contains the following attributes:
| 属性 | 类型 | 描述 |
|---|---|---|
| provider_id | string | 由提供者返回的提供者ID。如果提供者是OAuth提供者,则该ID指用户在OAuth提供者的账户。如果提供者是email或phone,则该ID是auth.users表中的用户ID。 |
| user_id | string | 身份关联的用户ID。 |
| identity_data | object | 身份元数据。对于OAuth和SAML身份,这包含来自提供者的用户信息。 |
| id | string | 身份的唯一ID。 |
| provider | string | 提供者名称。 |
string | 邮箱是一个生成列,引用identity_data中可选的邮箱属性。 | |
| created_at | string | 身份创建的时间戳。 |
| last_sign_in_at | string | 身份最后一次登录的时间戳。 |
| updated_at | string | 身份最后更新的时间戳。 |