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

Auth.js · Const

Naver

Naver is a built-in Auth.js OAuth provider. Add it to the providers list and configure the Naver client ID and secret through the documented environment variables.

How it works

Naver is a built-in OAuth provider that adds Naver sign-in to Auth.js. In Next.js, register the provider in the Auth.js configuration and supply the Naver application credentials through environment variables.

Syntax

Naver(options?: OAuthUserConfig<P>): OAuthConfig<P>

Parameters

NameTypeDescription
optionsOAuthUserConfig<P>Provider options, including OAuth configuration overrides and an optional profile type parameter.

Returns

OAuthConfig<P>

Key points

  • Auth.js includes Naver as a built-in provider, so a custom OAuth provider implementation is unnecessary.
  • The documented environment variable names are AUTH_NAVER_ID for the client identifier and AUTH_NAVER_SECRET for the client secret.
  • Next.js applications use /api/auth/callback/naver as the Naver callback endpoint.
  • Auth.js treats the Naver integration as an OAuth 2 provider by default.

Example: Configure Naver in Next.js

import NextAuth from "next-auth"
import Naver from "next-auth/providers/naver"

export const { handlers, auth, signIn, signOut } = NextAuth({
  providers: [Naver],
})

This registers Naver as an OAuth provider in a Next.js Auth.js configuration. Auth.js reads the client credentials from the documented environment variables.

When to use it

Social sign-in

Users authenticate with their Naver accounts in a Next.js application.

Customized OAuth configuration

An application needs Naver OAuth settings with selected defaults changed.

Provider selection

A multi-provider Auth.js deployment offers Naver alongside other identity providers.

Interview questions

QHow do you add Naver authentication to a Next.js Auth.js application?

Naver is added by importing the provider and placing it in the providers array passed to NextAuth. The Next.js integration can use the provider directly because Auth.js supplies its built-in configuration.

Follow-up: What credentials are needed? Set AUTH_NAVER_ID and AUTH_NAVER_SECRET so Auth.js can infer the Naver client credentials.

QWhat callback URL must be configured for Naver?

For Next.js, Naver redirects back to https://example.com/api/auth/callback/naver after authorization. The callback URL must match the value configured in the Naver developer console.

Follow-up: How does the callback path differ outside Next.js? Other documented integrations use /auth/callback/naver instead of /api/auth/callback/naver.

QWhat are the Naver provider's type-level input and output?

The provider factory accepts OAuthUserConfig<P> and returns OAuthConfig<P>, where P extends NaverProfile. This allows provider options and the profile type to remain strongly typed.

Follow-up: How can defaults be changed? Pass an options object to Naver and override the built-in OAuth configuration values needed by the application.

  • NaverProfile
  • OAuthUserConfig
  • OAuthConfig
  • NextAuth
  • providers

Source: Naver - Auth.js. Checked 2026-10-15.