new Auth()
Auth0 Auth API
Methods
(static) authorizeUrl(parameters) → {String}
Builds the full authorize endpoint url in the Authorization Server (AS) with given parameters.
Parameters:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
parameters |
Object
|
parameters to send to
|
Returns:
- Type:
-
String
authorize url with specified parameters to redirect to for AuthZ/AuthN.
(static) createUser(parameters) → {Promise}
- Source:
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
parameters |
Object
|
create user parameters
|
Returns:
- Type:
-
Promise
(static) exchange(parameters) → {Promise}
Exchanges a code obtained via /authorize (w/PKCE)
for the user's tokens
- Source:
- See:
Parameters:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
parameters |
Object
|
parameters used to obtain tokens from a code
|
Returns:
- Type:
-
Promise
(static) exchangeNativeSocial(parameters) → {Promise}
Exchanges an external token obtained via a native social authentication solution for the user's tokens
- Source:
- See:
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
parameters |
Object
|
parameters used to obtain user tokens from an external provider's token
|
Returns:
- Type:
-
Promise
(static) loginWithEmail(parameters) → {Promise}
Finishes the Passworldess authentication with an email connection
- Source:
Parameters:
| Name | Type | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
parameters |
Object
|
passwordless parameters
|
Returns:
- Type:
-
Promise
(static) loginWithSMS(parameters) → {Promise}
Finishes the Passworldess authentication with an SMS connection
- Source:
Parameters:
| Name | Type | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
parameters |
Object
|
passwordless parameters
|
Returns:
- Type:
-
Promise
(static) logoutUrl(parameters) → {String}
Builds the full logout endpoint url in the Authorization Server (AS) with given parameters.
Parameters:
| Name | Type | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
parameters |
Object
|
parameters to send to
|
Returns:
- Type:
-
String
logout url with specified parameters
(static) passwordlessWithEmail(parameters) → {Promise}
Starts the Passworldess flow with an email connection
- Source:
Parameters:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
parameters |
Object
|
passwordless parameters
|
Returns:
- Type:
-
Promise
(static) passwordlessWithSMS(parameters) → {Promise}
Starts the Passworldess flow with an SMS connection
- Source:
Parameters:
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
parameters |
Object
|
passwordless parameters
|
Returns:
- Type:
-
Promise
(static) passwordRealm(parameters) → {Promise}
Performs Auth with user credentials using the Password Realm Grant
- Source:
- See:
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
parameters |
Object
|
password realm parameters
|
Returns:
- Type:
-
Promise
(static) refreshToken(parameters) → {Promise}
Obtain new tokens using the Refresh Token obtained during Auth
(requesting offline_access scope)
- Source:
- See:
Parameters:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
parameters |
Object
|
refresh token parameters
|
Returns:
- Type:
-
Promise
(static) resetPassword(parameters) → {Promise}
Request an email with instructions to change password of a user
- Source:
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
parameters |
Object
|
reset password parameters
|
Returns:
- Type:
-
Promise
(static) revoke(parameters) → {Promise}
Revoke an issued refresh token
- Source:
Parameters:
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
parameters |
Object
|
revoke token parameters
|
Returns:
- Type:
-
Promise
(static) userInfo(parameters) → {Promise}
Return user information using an access token
- Source:
Parameters:
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
parameters |
Object
|
user info parameters
|
Returns:
- Type:
-
Promise