providers/auth0
Functionsβ
default()β
Add Auth0 login to your page.
Exampleβ
import { Auth } from "@auth/core"
import Auth0 from "@auth/core/providers/auth0"
const request = new Request("https://example.com")
const response = await Auth(request, {
providers: [Auth0({ clientId: "", clientSecret: "", issuer: "" })],
})
Resourcesβ
Notesβ
By default, Auth.js assumes that the Auth0 provider is based on the OIDC specification.
The Auth0 provider comes with a default configuration. To override the defaults for your use case, check out customizing a built-in OAuth provider.
If you think you found a bug in the default configuration, you can open an issue.
Auth.js strictly adheres to the specification and it cannot take responsibility for any deviation from the spec by the provider. You can open an issue, but if the problem is non-compliance with the spec, we might not pursue a resolution. You can ask for more help in Discussions.
Signatureβ
default(config: OIDCUserConfig<Auth0Profile>): OIDCConfig<Auth0Profile>;
Parametersβ
Name | Type |
---|---|
config | OIDCUserConfig <Auth0Profile > |
Returnsβ
Interfacesβ
Auth0Profileβ
Seeβ
Propertiesβ
app_metadataβ
object
Custom fields that store info about a user that influences the user's access, such as support plan, security roles (if not using the Authorization Core feature set), or access control groups. To learn more, read Metadata Overview.
blockedβ
boolean
Indicates whether the user has been blocked. Importing enables subscribers to ensure that users remain blocked when migrating to Auth0.
created_atβ
Date
Timestamp indicating when the user profile was first created.
emailβ
string
(unique) The user's email address.
email_verifiedβ
boolean
Indicates whether the user has verified their email address.
family_nameβ
string
The user's family name.
given_nameβ
string
The user's given name.
identitiesβ
{
[key: string]
:any
;connection
:string
;isSocial
:boolean
;profileData
:object
;provider
:string
;user_id
:string
; }[]
Contains info retrieved from the identity provider with which the user originally authenticates. Users may also link their profile to multiple identity providers; those identities will then also appear in this array. The contents of an individual identity provider object varies by provider. In some cases, it will also include an API Access Token to be used with the provider.
last_ipβ
string
IP address associated with the user's last login.
last_loginβ
Date
Timestamp indicating when the user last logged in. If a user is blocked and logs in, the blocked session updates last_login. If you are using this property from inside a Rule using the user< object, its value will be associated with the login that triggered the rule; this is because rules execute after login.
last_password_resetβ
Date
Timestamp indicating the last time the user's password was reset/changed. At user creation, this field does not exist. This property is only available for Database connections.
logins_countβ
number
Number of times the user has logged in. If a user is blocked and logs in, the blocked session is counted in logins_count.
multifactorβ
string
List of multi-factor providers with which the user is enrolled.
nameβ
string
The user's full name.
nicknameβ
string
The user's nickname.
phone_numberβ
string
The user's phone number. Only valid for users with SMS connections.
phone_verifiedβ
boolean
Indicates whether the user has been verified their phone number. Only valid for users with SMS connections.
pictureβ
string
URL pointing to the user's profile picture.
subβ
string
The user's unique identifier.
updated_atβ
Date
Timestamp indicating when the user's profile was last updated/modified. Changes to last_login are considered updates, so most of the time, updated_at will match last_login.
user_idβ
string
(unique) The user's identifier. Importing allows user records to be synchronized across multiple systems without using mapping tables.
user_metadataβ
object
Custom fields that store info about a user that does not impact what they can or cannot access, such as work address, home address, or user preferences. To learn more, read Metadata Overview.
usernameβ
string
(unique) The user's username.