docs/classes/auth.AuthenticationClient.html
Auth0 Authentication API Client
Provides access to Auth0's authentication endpoints for login, signup, passwordless authentication, and token exchange operations.
import { AuthenticationClient } from 'auth0';const auth0 = new AuthenticationClient({ domain: 'your-tenant.auth0.com', clientId: 'your-client-id'});Copy
// Exchange authorization code for tokensconst tokenSet = await auth0.oauth.authorizationCodeGrant({ code: 'auth-code', redirect_uri: 'https://app.example.com/callback'});Copy
// Create userconst user = await auth0.database.signUp({ connection: 'Username-Password-Authentication', username: '[email protected]', password: 'secure-password123'});Copy
databaseoauthpasswordlessbackchanneltokenExchange
new AuthenticationClient(
options: AuthenticationClientOptions,
): AuthenticationClient
Create a new Authentication API client
Configuration options for the client
database: Database
Database connection operations (signup, change password)
oauth: OAuth
OAuth 2.0 and OIDC operations (authorization, token exchange)
passwordless: Passwordless
Passwordless authentication (email/SMS)
backchannel: IBackchannel
Back-channel authentication (CIBA)
tokenExchange: ICustomTokenExchange
Custom token exchange operations
Member Visibility
ThemeOSLightDark
Constructors constructor Properties databaseoauthpasswordlessbackchanneltokenExchange