Documentation / zerotal / auth / SocialUser
Interface: SocialUser
Defined in: packages/auth/src/social/types.ts:4
Normalised user profile returned by every OAuth2 driver.
Properties
id
id:
string
Defined in: packages/auth/src/social/types.ts:6
Provider-specific unique user ID (always a string).
name
name:
string
Defined in: packages/auth/src/social/types.ts:8
Display name.
email:
string|null
Defined in: packages/auth/src/social/types.ts:10
Primary email address (may be null if the provider doesn't share it).
emailVerified
emailVerified:
boolean
Defined in: packages/auth/src/social/types.ts:23
Whether the provider has verified that this account controls email.
Check this before matching a social login onto an existing account by address. Most
providers let a user type any address into their profile, and an attacker who controls
a Workspace/Entra domain can create victim@corp.com outright — so find-or-create by
unverified email is an account-takeover path with the provider's name on it.
false means "not asserted", not "known bad": a driver reports true only when the
provider makes an explicit verification claim (Google's email_verified, GitHub's
verified primary address). Providers that make no such claim always report false.
avatar
avatar:
string|null
Defined in: packages/auth/src/social/types.ts:25
Avatar / profile picture URL.
token
token:
string
Defined in: packages/auth/src/social/types.ts:27
Raw access token returned by the provider.
refreshToken
refreshToken:
string|null
Defined in: packages/auth/src/social/types.ts:33
Refresh token, when the provider issues one. Most providers only return a
refresh token when offline access is requested — e.g. Google requires
.with({ access_type: 'offline' }). null when the provider omits it.
expiresIn
expiresIn:
number|null
Defined in: packages/auth/src/social/types.ts:35
Access-token lifetime in seconds, or null when the provider omits it.
raw
raw:
Record<string,unknown>
Defined in: packages/auth/src/social/types.ts:37
Raw token data as returned by the provider (for custom fields).