Skip to content
Auth

身份

身份是一种与用户关联的认证方法。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_idstring由提供者返回的提供者ID。如果提供者是OAuth提供者,则该ID指用户在OAuth提供者的账户。如果提供者是emailphone,则该ID是auth.users表中的用户ID。
user_idstring身份关联的用户ID。
identity_dataobject身份元数据。对于OAuth和SAML身份,这包含来自提供者的用户信息。
idstring身份的唯一ID。
providerstring提供者名称。
emailstring邮箱是一个生成列,引用identity_data中可选的邮箱属性。
created_atstring身份创建的时间戳。
last_sign_in_atstring身份最后一次登录的时间戳。
updated_atstring身份最后更新的时间戳。