Back to Node Auth0

Class AuthenticationClient

docs/classes/auth.AuthenticationClient.html

5.9.12.3 KB
Original Source
  • auth
  • AuthenticationClient

Class AuthenticationClient

Auth0 Authentication API Client

Provides access to Auth0's authentication endpoints for login, signup, passwordless authentication, and token exchange operations.

Example: Basic setup

import { AuthenticationClient } from 'auth0';const auth0 = new AuthenticationClient({ domain: 'your-tenant.auth0.com', clientId: 'your-client-id'});Copy

Example: OAuth login

// Exchange authorization code for tokensconst tokenSet = await auth0.oauth.authorizationCodeGrant({ code: 'auth-code', redirect_uri: 'https://app.example.com/callback'});Copy

Example: Database operations

// Create userconst user = await auth0.database.signUp({ connection: 'Username-Password-Authentication', username: '[email protected]', password: 'secure-password123'});Copy

Index

Constructors

constructor

Properties

databaseoauthpasswordlessbackchanneltokenExchange

Constructors

constructor

new AuthenticationClient(
options: AuthenticationClientOptions,
): AuthenticationClient

Create a new Authentication API client

Parameters

Configuration options for the client

Returns AuthenticationClient

Properties

database

database: Database

Database connection operations (signup, change password)

oauth

oauth: OAuth

OAuth 2.0 and OIDC operations (authorization, token exchange)

passwordless

passwordless: Passwordless

Passwordless authentication (email/SMS)

backchannel

backchannel: IBackchannel

Back-channel authentication (CIBA)

tokenExchange

tokenExchange: ICustomTokenExchange

Custom token exchange operations

Settings

Member Visibility

  • Protected
  • Inherited

ThemeOSLightDark

On This Page

Constructors constructor Properties databaseoauthpasswordlessbackchanneltokenExchange