Optional
clientOptional
clientOptional
clientProtected
configurationOptional
useMTLSOnce you have a verification code, use this endpoint to login the user with their email and verification code.
const auth0 = new AuthenticationApi({
domain: 'my-domain.auth0.com',
clientId: 'myClientId',
clientSecret: 'myClientSecret'
});
await auth0.passwordless.loginWithEmail({
email: 'foo@example.com',
code: 'ABC123'
});
Once you have a verification code, use this endpoint to login the user with their phone number and verification code.
const auth0 = new AuthenticationApi({
domain: 'my-domain.auth0.com',
clientId: 'myClientId',
clientSecret: 'myClientSecret'
});
await auth0.passwordless.loginWithSMS({
phone_number: '0777777777',
code: 'ABC123'
});
Protected
requestOptional
initOverrides: RequestInit | InitOverrideFunctionStart passwordless flow sending an email.
Given the user email
address, it will send an email with:
See: https://auth0.com/docs/api/authentication#get-code-or-link
const auth0 = new AuthenticationApi({
domain: 'my-domain.auth0.com',
clientId: 'myClientId',
clientSecret: 'myClientSecret'
});
await auth0.passwordless.sendEmail({
email: '{EMAIL}',
send: 'link',
authParams: {} // Optional auth params.
});
Optional
initOverrides: InitOverrideStart passwordless flow sending an SMS.
Given the user phone_number
, it will send a SMS message with a
verification code. You can then authenticate with this user using the
/oauth/token
endpoint specifying phone_number
as username
and code
as
password
:
See: https://auth0.com/docs/api/authentication#get-code-or-link
const auth0 = new AuthenticationApi({
domain: 'my-domain.auth0.com',
clientId: 'myClientId',
clientSecret: 'myClientSecret'
});
await auth0.passwordless.sendSMS({
phone_number: '{PHONE}'
});
Optional
initOverrides: InitOverride
Handles passwordless flows using Email and SMS.