[**Documentation**](../../../README)

***

[Documentation](../../../README) / [@zerotal/auth](../README) / SocialUser

# Interface: SocialUser

Defined in: [auth/src/social/types.ts:4](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/auth/src/social/types.ts#L4)

Normalised user profile returned by every OAuth2 driver.

## Properties

### id

> **id**: `string`

Defined in: [auth/src/social/types.ts:6](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/auth/src/social/types.ts#L6)

Provider-specific unique user ID (always a string).

***

### name

> **name**: `string`

Defined in: [auth/src/social/types.ts:8](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/auth/src/social/types.ts#L8)

Display name.

***

### email

> **email**: `string` \| `null`

Defined in: [auth/src/social/types.ts:10](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/auth/src/social/types.ts#L10)

Primary email address (may be null if the provider doesn't share it).

***

### emailVerified

> **emailVerified**: `boolean`

Defined in: [auth/src/social/types.ts:23](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/auth/src/social/types.ts#L23)

Whether the **provider** has verified that this account controls [email](#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: [auth/src/social/types.ts:25](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/auth/src/social/types.ts#L25)

Avatar / profile picture URL.

***

### token

> **token**: `string`

Defined in: [auth/src/social/types.ts:27](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/auth/src/social/types.ts#L27)

Raw access token returned by the provider.

***

### refreshToken

> **refreshToken**: `string` \| `null`

Defined in: [auth/src/social/types.ts:33](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/auth/src/social/types.ts#L33)

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: [auth/src/social/types.ts:35](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/auth/src/social/types.ts#L35)

Access-token lifetime in seconds, or `null` when the provider omits it.

***

### raw

> **raw**: `Record`\<`string`, `unknown`\>

Defined in: [auth/src/social/types.ts:37](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/auth/src/social/types.ts#L37)

Raw token data as returned by the provider (for custom fields).
