pub struct UserSchema {Show 25 fields
pub id: Uuid,
pub aud: String,
pub role: String,
pub email: Option<String>,
pub email_confirmed_at: Option<OffsetDateTime>,
pub invited_at: Option<OffsetDateTime>,
pub phone: Option<String>,
pub phone_confirmed_at: Option<OffsetDateTime>,
pub confirmation_sent_at: Option<OffsetDateTime>,
pub confirmed_at: Option<OffsetDateTime>,
pub recovery_sent_at: Option<OffsetDateTime>,
pub new_email: Option<String>,
pub email_change_sent_at: Option<OffsetDateTime>,
pub new_phone: Option<String>,
pub phone_change_sent_at: Option<OffsetDateTime>,
pub reauthentication_sent_at: Option<OffsetDateTime>,
pub last_sign_in_at: Option<OffsetDateTime>,
pub user_metadata: Option<HashMap<String, Value>>,
pub app_metadata: Option<HashMap<String, Value>>,
pub factors: Vec<MFAFactorSchema>,
pub identities: Option<Vec<HashMap<String, Value>>>,
pub banned_until: Option<OffsetDateTime>,
pub created_at: Option<OffsetDateTime>,
pub deleted_at: Option<OffsetDateTime>,
pub updated_at: Option<OffsetDateTime>,
}
Expand description
Represents a user in the Supabase Auth system
This struct contains all the information about a user including their authentication status, contact information, and metadata.
Fields§
§id: Uuid
Unique identifier for the user
aud: String
Audience claim for JWT (typically the API URL)
role: String
User’s role in the system (e.g., “authenticated”)
email: Option<String>
User’s primary contact email. In most cases you can uniquely identify a user by their email address, but not in all cases.
email_confirmed_at: Option<OffsetDateTime>
Timestamp when the email was confirmed
invited_at: Option<OffsetDateTime>
Timestamp when the user was invited
phone: Option<String>
User’s primary contact phone number. In most cases you can uniquely identify a user by their phone number, but not in all cases.
phone_confirmed_at: Option<OffsetDateTime>
Timestamp when the phone number was confirmed
confirmation_sent_at: Option<OffsetDateTime>
Timestamp when confirmation email/SMS was sent
confirmed_at: Option<OffsetDateTime>
Timestamp when the user confirmed their account
recovery_sent_at: Option<OffsetDateTime>
Timestamp when password recovery email was sent
new_email: Option<String>
Pending new email address (awaiting confirmation)
email_change_sent_at: Option<OffsetDateTime>
Timestamp when email change confirmation was sent
new_phone: Option<String>
Pending new phone number (awaiting confirmation)
phone_change_sent_at: Option<OffsetDateTime>
Timestamp when phone change confirmation was sent
reauthentication_sent_at: Option<OffsetDateTime>
Timestamp when reauthentication request was sent
last_sign_in_at: Option<OffsetDateTime>
Timestamp of the user’s last sign in
user_metadata: Option<HashMap<String, Value>>
Custom user metadata that can be updated by the user
app_metadata: Option<HashMap<String, Value>>
Custom app metadata that can only be updated by service role
factors: Vec<MFAFactorSchema>
Multi-factor authentication factors
identities: Option<Vec<HashMap<String, Value>>>
OAuth/social login identities linked to this user
banned_until: Option<OffsetDateTime>
Timestamp until which the user is banned
created_at: Option<OffsetDateTime>
Timestamp when the user was created
deleted_at: Option<OffsetDateTime>
Timestamp when the user was soft deleted
updated_at: Option<OffsetDateTime>
Timestamp when the user was last updated
Trait Implementations§
Source§impl Clone for UserSchema
impl Clone for UserSchema
Source§fn clone(&self) -> UserSchema
fn clone(&self) -> UserSchema
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for UserSchema
impl Debug for UserSchema
Source§impl Default for UserSchema
impl Default for UserSchema
Source§fn default() -> UserSchema
fn default() -> UserSchema
Source§impl<'de> Deserialize<'de> for UserSchemawhere
UserSchema: Default,
impl<'de> Deserialize<'de> for UserSchemawhere
UserSchema: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for UserSchema
impl PartialEq for UserSchema
Source§impl Serialize for UserSchema
impl Serialize for UserSchema
impl Eq for UserSchema
impl StructuralPartialEq for UserSchema
Auto Trait Implementations§
impl Freeze for UserSchema
impl RefUnwindSafe for UserSchema
impl Send for UserSchema
impl Sync for UserSchema
impl Unpin for UserSchema
impl UnwindSafe for UserSchema
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.