Skip to content
masterclassBuddyTech Buzz5 fresh blogs · 5:00 AM IST

Auth.js · Interface

AdapterUser

AdapterUser is the database-facing user shape used by an Auth.js adapter. It represents someone who can sign in and carries the identity data needed to associate that person with accounts and authentication records.

How it works

AdapterUser is the database-backed user shape used by Auth.js adapters. It identifies someone who can sign in and includes the required identifier, email, and email-verification state, with optional profile fields such as name and image.

Syntax

interface AdapterUser extends User {
  id: string
  email: string
  emailVerified: Date | null
}

Returns

An AdapterUser value representing a sign-in-capable user.

Key points

  • AdapterUser models an application person who is allowed to authenticate.
  • Initial user data comes from the identity provider's returned profile information.
  • The provider account is associated with the created user.
  • The user has a unique identifier used to distinguish the database record.

Common mistakes

  • The adapter may create the user during the first sign-in when no matching user exists.
  • For an identity-provider sign-in, the provider account is linked to the newly created user.

Example: Construct an AdapterUser

import type { AdapterUser } from "next-auth/adapters"

const user: AdapterUser = {
  id: "user_123",
  email: "ada@example.com",
  emailVerified: null,
  name: "Ada Lovelace",
  image: null,
}

console.log(user.id)

Creates a value that satisfies the adapter user shape.

When to use it

Create a database user

Persisting a newly authenticated person in an adapter-backed database.

Read an authenticated user

Returning a normalized user from an adapter lookup.

Link an external account

Associating an OAuth provider account with its application user.

Interview questions

QWhat does AdapterUser represent?

AdapterUser is the user representation returned by an Auth.js adapter and represents a person who can sign in. Adapter operations such as creating or updating a database user return this shape.

Follow-up: How does it differ from User? User is the provider/profile-facing shape, while AdapterUser is the adapter/database-facing shape and includes the adapter-required identity fields.

QWhich information does an AdapterUser contain?

Its required identity data includes a unique user identifier, an email address, and the email verification value. Optional profile information can include a display name and image.

Follow-up: Why is the identifier essential? Adapter operations use it to retrieve, update, delete, and associate related records with the user.

QWhen is an AdapterUser created?

When a user is absent, Auth.js can create the user on the first sign-in using identity-provider profile data. It also creates and links the corresponding provider account.

Follow-up: What should an adapter support beyond users? It should also link and unlink accounts and handle active sessions and passwordless authentication.

  • Adapter
  • User
  • Account
  • createUser
  • updateUser
  • getUser

Source: Adapters. Checked 2026-10-15.