Skip to content
The Auth.js project is now part of Better Auth.

providers/amazon

Built-in Amazon integration.

AmazonProfile

Extends

Indexable

[key: string]: any

Properties

email

email: string;

name

name: string;

postal_code?

optional postal_code: string;

user_id

user_id: string;

default()

function default<P>(options): OAuthConfig<P>

Add “Login with Amazon” login to your page.

Setup

Callback URL

https://example.com/auth/callback/amazon

For Express.js or Next.js Pages Router, use:

https://example.com/api/auth/callback/amazon

Configuration

import { Auth } from "@auth/core"
import Amazon from "@auth/core/providers/amazon"
 
const request = new Request(origin)
const response = await Auth(request, {
  providers: [
    Amazon({
      clientId: AUTH_AMAZON_ID,
      clientSecret: AUTH_AMAZON_SECRET,
    }),
  ],
})

Resources

Bug reports

If you encounter issues with this provider, please check the Auth.js documentation and open an issue in the Auth.js repository with details about your configuration and error.

Customization

If you need to override this provider’s defaults, follow the Auth.js guide on customizing built-in OAuth providers.

Type Parameters

Type Parameter
P extends AmazonProfile

Parameters

ParameterType
optionsOAuthUserConfig<P>

Returns

OAuthConfig<P>

Auth.js © Better Auth Inc. - 2026