ProtectedbuildProtectedbuildProtectedextractProtectedgetProtectedgetProtectedhandleProtectedhasProtectedinternalProtectedisProtectedprepareProtectedsetProtectedsetOptionalstackStaticstackThe Error.stackTraceLimit property specifies the number of stack frames
+collected by a stack trace (whether generated by new Error().stack or
+Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
+will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will +not capture any frames.
+StaticcaptureCreates a .stack property on targetObject, which when accessed returns
+a string representing the location in the code at which
+Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`
+
+
+The first line of the trace will be prefixed with
+${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
+above constructorOpt, including constructorOpt, will be omitted from the
+generated stack trace.
The constructorOpt argument is useful for hiding implementation
+details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
+
+
+OptionalconstructorOpt: FunctionStaticfromStaticprepareOptional addressOptional birthdateOptional emailOptional email_Optional family_Optional genderOptional given_Optional localeOptional middle_Optional nameOptional nicknameOptional phone_Optional phone_Optional pictureOptional preferred_Optional profileOptional subOptional updated_Optional websiteOptional zoneinfoOptionaladdressOptionalbirthdateOptionalemailOptionalemail_Optionalfamily_OptionalgenderOptionalgiven_OptionallocaleOptionalmiddle_OptionalnameOptionalnicknameOptionalphone_Optionalphone_OptionalpictureOptionalpreferred_OptionalprofileOptionalsubOptionalupdated_OptionalwebsiteOptionalzoneinfoCreates the Auth0 plugin.
-The Auth Vue Client Options
-Optional pluginOptions: Auth0PluginOptionsAdditional Plugin Configuration Options
-An instance of Auth0Plugin
-Creates the Auth0 plugin.
+The Auth Vue Client Options
+OptionalpluginOptions: Auth0PluginOptionsAdditional Plugin Configuration Options
+An instance of Auth0Plugin
+Optional app: App<any>The vue application
-Optional options: AuthGuardOptionsThe options used when creating an AuthGuard.
-Optionalapp: App<any>The vue application
+Optionaloptions: AuthGuardOptionsThe options used when creating an AuthGuard.
+Returns the registered Auth0 instance using Vue's inject.
Returns the registered Auth0 instance using Vue's inject.
An instance of Auth0VueClient
-

📚 Documentation - 🚀 Getting Started - 💻 API Reference - 💬 Feedback
-This library supports Vue 3 applications. -For integrating Auth0 with a Vue 2 application, please read the Vue 2 Tutorial.
-Using npm:
-npm install @auth0/auth0-vue
-
-Using yarn:
-yarn add @auth0/auth0-vue
-
-Create a Single Page Application in the Auth0 Dashboard.
+This library supports Vue 3 applications. +For integrating Auth0 with a Vue 2 application, please read the Vue 2 Tutorial.
+Using npm:
+npm install @auth0/auth0-vue
+
+
+Using yarn:
+yarn add @auth0/auth0-vue
+
+
+Create a Single Page Application in the Auth0 Dashboard.
-If you're using an existing application, verify that you have configured the following settings in your Single Page Application:
+If you're using an existing application, verify that you have configured the following settings in your Single Page Application:
-
- Click on the "Settings" tab of your application's page.
+- Click on the "Settings" tab of your application's page.
- Scroll down and click on the "Show Advanced Settings" link.
- Under "Advanced Settings", click on the "OAuth" tab.
- Ensure that "JsonWebToken Signature Algorithm" is set to
@@ -37,43 +40,45 @@RS256and that "OIDC Conformant" is enabled.- Allowed Web Origins:
http://localhost:3000--These URLs should reflect the origins that your application is running on. Allowed Callback URLs may also include a path, depending on where you're handling the callback (see below).
+These URLs should reflect the origins that your application is running on. Allowed Callback URLs may also include a path, depending on where you're handling the callback (see below).
Take note of the Client ID and Domain values under the "Basic Information" section. You'll need these values in the next step.
-Configure the SDK
Create an instance of the
-Auth0Pluginby callingcreateAuth0and pass it to Vue'sapp.use().-import { createAuth0 } from '@auth0/auth0-vue';
const app = createApp(App);
app.use(
createAuth0({
domain: '<AUTH0_DOMAIN>',
clientId: '<AUTH0_CLIENT_ID>',
authorizationParams: {
redirect_uri: '<MY_CALLBACK_URL>'
}
})
);
app.mount('#app'); -Add login to your application
In order to add login to your application you can use the
-loginWithRedirectfunction that is exposed on the return value ofuseAuth0, which you can access in your component'ssetupfunction.-<script>
import { useAuth0 } from '@auth0/auth0-vue';
export default {
setup() {
const { loginWithRedirect } = useAuth0();
return {
login: () => {
loginWithRedirect();
}
};
}
};
</script> -Once setup returns the correct method, you can call that method from your component's HTML.
-+<template>
<div>
<button @click="login">Log in</button>
</div>
</template> -Take note of the Client ID and Domain values under the "Basic Information" section. You'll need these values in the next step.
+Configure the SDK
Create an instance of the
+Auth0Pluginby callingcreateAuth0and pass it to Vue'sapp.use().+ +import { createAuth0 } from '@auth0/auth0-vue';
const app = createApp(App);
app.use(
createAuth0({
domain: '<AUTH0_DOMAIN>',
clientId: '<AUTH0_CLIENT_ID>',
authorizationParams: {
redirect_uri: '<MY_CALLBACK_URL>'
}
})
);
app.mount('#app'); +Add login to your application
In order to add login to your application you can use the
+loginWithRedirectfunction that is exposed on the return value ofuseAuth0, which you can access in your component'ssetupfunction.+ +<script>
import { useAuth0 } from '@auth0/auth0-vue';
export default {
setup() {
const { loginWithRedirect } = useAuth0();
return {
login: () => {
loginWithRedirect();
}
};
}
};
</script> +Once setup returns the correct method, you can call that method from your component's HTML.
++<template>
<div>
<button @click="login">Log in</button>
</div>
</template> +- -Using Options API
+-<template>
<div>
<button @click="login">Log in</button>
</div>
</template>
<script>
export default {
methods: {
login() {
this.$auth0.loginWithRedirect();
}
}
};
</script> +<template>
<div>
<button @click="login">Log in</button>
</div>
</template>
<script>
export default {
methods: {
login() {
this.$auth0.loginWithRedirect();
}
}
};
</script> -For more code samples on how to integrate the auth0-vue SDK in your Vue 3 application, have a look at our examples.
-API reference
Explore public API's available in auth0-vue.
+For more code samples on how to integrate the auth0-vue SDK in your Vue 3 application, have a look at our examples.
+API reference
Explore public API's available in auth0-vue.
-
-- createAuth0
-- createAuthGuard
-- useAuth0
-- Auth0PluginOptions
-- Auth0VueClientOptions
-- Auth0VueClient
+- createAuth0
+- createAuthGuard
+- useAuth0
+- Auth0PluginOptions
+- Auth0VueClientOptions
+- Auth0VueClient
Feedback
Contributing
We appreciate feedback and contribution to this repo! Before you get started, please see the following:
+Feedback
Contributing
We appreciate feedback and contribution to this repo! Before you get started, please see the following:
-
-- Auth0's general contribution guidelines
-- Auth0's code of conduct guidelines
-- This repo's contribution guide
+- Auth0's general contribution guidelines
+- Auth0's code of conduct guidelines
+- This repo's contribution guide
Raise an issue
To provide feedback or report a bug, please raise an issue on our issue tracker.
-Vulnerability Reporting
Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.
+Raise an issue
To provide feedback or report a bug, please raise an issue on our issue tracker.
+Vulnerability Reporting
Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.
@@ -84,4 +89,4 @@ Auth0 is an easy to implement, adaptable authentication and authorization platform. To learn more checkout Why Auth0?
-This project is licensed under the MIT license. See the LICENSE file for more info.
Any custom parameter to be stored in appState
-Optional targetTarget path the app gets routed to after -handling the callback from Auth0 (defaults to '/')
-Any custom parameter to be stored in appState
+Additional Configuration for the Auth0 Vue plugin
-Optional errorPath in your application to redirect to when the Authorization server +
Additional Configuration for the Auth0 Vue plugin
+OptionalerrorPath in your application to redirect to when the Authorization server
returns an error. Defaults to /
Optional skipBy default, if the page URL has code and state parameters, the SDK will assume it should handle it and attempt to exchange the code for a token.
+OptionalskipBy default, if the page URL has code and state parameters, the SDK will assume it should handle it and attempt to exchange the code for a token.
In situations where you are combining our SDK with other libraries that use the same code and state parameters,
you will need to ensure our SDK can differentiate between requests it should and should not handle.
In these cases you can instruct the client to ignore certain URLs by setting skipRedirectCallback.
createAuth0({}, {
skipRedirectCallback: window.location.pathname === '/other-callback'
})
-
+createAuth0({}, {
skipRedirectCallback: window.location.pathname === '/other-callback'
})
+
+
Note: In the above example, /other-callback is an existing route, with a code (or error in case when something went wrong) and state, that will be handled
by any other SDK.
Contains an error that occured in the SDK
-Contains all claims from the id_token if available.
-The authentication state, true if the user is authenticated, false if not.
The loading state of the SDK, true if the SDK is still processing the PKCE flow, false if the SDK has finished processing the PKCE flow.
Contains the information of the user if available.
-await checkSession();
-
+Contains an error that occured in the SDK
+Contains all claims from the id_token if available.
+The authentication state, true if the user is authenticated, false if not.
The loading state of the SDK, true if the SDK is still processing the PKCE flow, false if the SDK has finished processing the PKCE flow.
Contains the information of the user if available.
+await checkSession();
+
+
Check if the user is logged in using getTokenSilently. The difference
-with getTokenSilently is that this doesn't return a token, but it will
+with getTokenSilently is that this doesn't return a token, but it will
pre-fill the token cache.
This method also heeds the auth0.{clientId}.is.authenticated cookie, as an optimization
- to prevent calling Auth0 unnecessarily. If the cookie is not present because
+to prevent calling Auth0 unnecessarily. If the cookie is not present because
there was no previous login (or it has expired) then tokens will not be refreshed.
Optional options: GetTokenSilentlyOptionsFetches a new access token and returns the response from the /oauth/token endpoint, omitting the refresh token.
-Fetches a new access token and returns it.
-Optional options: GetTokenSilentlyOptionsconst token = await getTokenWithPopup(options);
-
+Optionaloptions: GetTokenSilentlyOptionsconst fetcher = createFetcher({
dpopNonceId: 'my-api',
baseUrl: 'https://api.example.com'
});
const response = await fetcher.fetchWithAuth('/data', {
method: 'GET'
});
const data = await response.json();
+
+
+Creates a fetcher instance that automatically handles authentication for API requests.
+The fetcher automatically:
+getAccessTokenSilently()Authorization headersThis is the recommended way to make authenticated API calls, especially when using DPoP.
+Optionalconfig: FetcherConfig<TOutput>Configuration options for the fetcher
+const proof = await generateDpopProof({
url: 'https://api.example.com/data',
method: 'GET',
accessToken: token
});
+
+
+Generates a DPoP proof JWT that cryptographically binds an access token to the current client.
+The proof is a signed JWT that demonstrates possession of the private key associated with +the public key in the access token. This prevents token theft and replay attacks.
+Note: Requires useDpop: true in the Auth0 client configuration.
+Most developers should use createFetcher() instead, which handles proof generation automatically.
Configuration for generating the proof
+The access token to bind to the proof
+The HTTP method (GET, POST, etc.)
+Optionalnonce?: stringOptional nonce value from a previous server response
+The target URL for the API request
+Fetches a new access token and returns the response from the /oauth/token endpoint, omitting the refresh token.
+Fetches a new access token and returns it.
+Optionaloptions: GetTokenSilentlyOptionsconst token = await getTokenWithPopup(options);
+
+
Opens a popup with the /authorize URL using the parameters
provided as arguments. Random and secure state and nonce
parameters will be auto-generated. If the response is successful,
results will be valid according to their expiration times.
Optional options: GetTokenWithPopupOptionsOptional config: PopupConfigOptionsAfter the browser redirects back to the callback page, +
Optionaloptions: GetTokenWithPopupOptionsOptionalconfig: PopupConfigOptionsconst nonce = await getDpopNonce();
+
+
+Retrieves the current DPoP nonce value for a specific identifier.
+The nonce is used to prevent replay attacks when using DPoP (Demonstrating Proof-of-Possession).
+It may return undefined initially before the first server response.
Note: Requires useDpop: true in the Auth0 client configuration.
Optionalid: stringOptional identifier for the nonce. If omitted, returns the nonce for Auth0 requests. +Use a custom identifier for tracking nonces for different API endpoints.
+After the browser redirects back to the callback page,
call handleRedirectCallback to handle success and error
responses from Auth0. If the response is successful, results
will be valid according to their expiration times.
Note: The Auth0-Vue SDK handles this for you, unless you set skipRedirectCallback to true.
In that case, be sure to explicitly call handleRedirectCallback yourself.
Optional url: stringtry {
await loginWithPopup(options);
} catch(e) {
if (e instanceof PopupCancelledError) {
// Popup was closed before login completed
}
}
-
+Optionalurl: stringtry {
await loginWithPopup(options);
} catch(e) {
if (e instanceof PopupCancelledError) {
// Popup was closed before login completed
}
}
+
+
Opens a popup with the /authorize URL using the parameters
provided as arguments. Random and secure state and nonce
parameters will be auto-generated. If the response is successful,
@@ -46,13 +89,15 @@
IMPORTANT: This method has to be called from an event handler that was started by the user like a button click, for example, otherwise the popup will be blocked in most browsers.
-Optional options: PopupLoginOptionsOptional config: PopupConfigOptionsawait loginWithRedirect(options);
-
+Optionaloptions: PopupLoginOptionsOptionalconfig: PopupConfigOptionsawait loginWithRedirect(options);
+
+
Performs a redirect to /authorize using the parameters
provided as arguments. Random and secure state and nonce
parameters will be auto-generated.
Optional options: RedirectLoginOptions<AppState>logout();
-
+Optionaloptions: RedirectLoginOptions<AppState>logout();
+
+
Clears the application session and performs a redirect to /v2/logout, using
the parameters provided as arguments, to clear the Auth0 session.
Note: If you are using a custom cache, and specifying localOnly: true, and you want to perform actions or read state from the SDK immediately after logout, you should await the result of calling logout.
localOnly option is specified, it only clears the application session.
It is invalid to set both the federated and localOnly options to true,
and an error will be thrown if you do.
-Read more about how Logout works at Auth0.
-Optional options: LogoutOptionsOptionaloptions: LogoutOptionsawait setDpopNonce('new-nonce-value', 'my-api');
+
+
+Stores a DPoP nonce value for future use with a specific identifier.
+This is typically called automatically when the server provides a new nonce
+in the DPoP-Nonce response header. Manual usage is only needed for advanced scenarios.
Note: Requires useDpop: true in the Auth0 client configuration.
The nonce value to store
+Optionalid: stringOptional identifier for the nonce. If omitted, sets the nonce for Auth0 requests. +Use a custom identifier for managing nonces for different API endpoints.
+Configuration for the Auth0 Vue Client
-Optional Internal auth0Internal property to send information about the client to the authorization server.
-Optional env?: { Optional authorizationURL parameters that will be sent back to the Authorization Server. This can be known parameters +
Configuration for the Auth0 Vue Client
+Optional Internalauth0Internal property to send information about the client to the authorization server.
+OptionalauthorizationURL parameters that will be sent back to the Authorization Server. This can be known parameters defined by Auth0 or custom parameters that you define.
-Optional authorizeA maximum number of seconds to wait before declaring background calls to /authorize as failed for timeout +
OptionalauthorizeA maximum number of seconds to wait before declaring background calls to /authorize as failed for timeout Defaults to 60s.
-Optional cacheSpecify a custom cache implementation to use for token storage and retrieval. This setting takes precedence over cacheLocation if they are both specified.
Optional cacheThe location to use when storing cache data. Valid values are memory or localstorage.
+
OptionalcacheSpecify a custom cache implementation to use for token storage and retrieval. This setting takes precedence over cacheLocation if they are both specified.
OptionalcacheThe location to use when storing cache data. Valid values are memory or localstorage.
The default setting is memory.
Read more about changing storage options in the Auth0 docs
-The Client ID found on your Application settings page
-Optional cookieThe domain the cookie is accessible from. If not set, the cookie is scoped to +
Read more about changing storage options in the Auth0 docs
+The Client ID found on your Application settings page
+OptionalcookieThe domain the cookie is accessible from. If not set, the cookie is scoped to the current domain, including the subdomain.
Note: setting this incorrectly may cause silent authentication to stop working on page load.
To keep a user logged in across multiple subdomains set this to your
top-level domain and prefixed with a . (eg: .example.com).
Your Auth0 account domain such as 'example.auth0.com',
-'example.eu.auth0.com' or , 'example.mycompany.com'
-(when using custom domains)
Optional httpSpecify the timeout for HTTP calls using fetch. The default is 10 seconds.
Optional issuerThe issuer to be used for validation of JWTs, optionally defaults to the domain above
-Optional leewayThe value in seconds used to account for clock skew in JWT expirations. +
Your Auth0 account domain such as 'example.auth0.com',
+'example.eu.auth0.com' or , 'example.mycompany.com'
+(when using custom domains)
OptionalhttpSpecify the timeout for HTTP calls using fetch. The default is 10 seconds.
OptionalissuerThe issuer to be used for validation of JWTs, optionally defaults to the domain above
+OptionalleewayThe value in seconds used to account for clock skew in JWT expirations. Typically, this value is no more than a minute or two at maximum. Defaults to 60s.
-Optional legacySets an additional cookie with no SameSite attribute to support legacy browsers +
OptionallegacySets an additional cookie with no SameSite attribute to support legacy browsers that are not compatible with the latest SameSite changes. This will log a warning on modern browsers, you can disable the warning by setting this to false but be aware that some older useragents will not work, -See https://www.chromium.org/updates/same-site/incompatible-clients +See https://www.chromium.org/updates/same-site/incompatible-clients Defaults to true
-Optional nowModify the value used as the current time during the token validation.
+OptionalnowModify the value used as the current time during the token validation.
Note: Using this improperly can potentially compromise the token validation.
-Optional sessionNumber of days until the cookie auth0.is.authenticated will expire
+
OptionalsessionNumber of days until the cookie auth0.is.authenticated will expire
Defaults to 1.
Optional useIf true, the SDK will use a cookie when storing information about the auth transaction while
+
OptionaluseIf true, the SDK will use a cookie when storing information about the auth transaction while
the user is going through the authentication flow on the authorization server.
The default is false, in which case the SDK will use session storage.
You might want to enable this if you rely on your users being able to authenticate using flows that +
You might want to enable this if you rely on your users being able to authenticate using flows that may end up spanning across multiple tabs (e.g. magic links) or you cannot otherwise rely on session storage being available.
-Optional useIf true, data to the token endpoint is transmitted as x-www-form-urlencoded data, if false it will be transmitted as JSON. The default setting is true.
OptionaluseIf true, DPoP (OAuth 2.0 Demonstrating Proof of Possession, RFC9449)
+will be used to cryptographically bind tokens to this specific browser
+so they can't be used from a different device in case of a leak.
The default setting is false.
OptionaluseIf true, data to the token endpoint is transmitted as x-www-form-urlencoded data, if false it will be transmitted as JSON. The default setting is true.
Note: Setting this to false may affect you if you use Auth0 Rules and are sending custom, non-primitive data. If you disable this,
please verify that your Auth0 Rules continue to work as intended.
Optional useIf true, refresh tokens are used to fetch new access tokens from the Auth0 server. If false, the legacy technique of using a hidden iframe and the authorization_code grant with prompt=none is used.
+
OptionaluseIf true, the SDK will allow the refreshing of tokens using MRRT
OptionaluseIf true, refresh tokens are used to fetch new access tokens from the Auth0 server. If false, the legacy technique of using a hidden iframe and the authorization_code grant with prompt=none is used.
The default setting is false.
Note: Use of refresh tokens must be enabled by an administrator on your Auth0 client application.
-Optional useIf true, fallback to the technique of using a hidden iframe and the authorization_code grant with prompt=none when unable to use refresh tokens. If false, the iframe fallback is not used and
+
OptionaluseIf true, fallback to the technique of using a hidden iframe and the authorization_code grant with prompt=none when unable to use refresh tokens. If false, the iframe fallback is not used and
errors relating to a failed refresh_token grant should be handled appropriately. The default setting is false.
Note: There might be situations where doing silent auth with a Web Message response from an iframe is not possible,
-like when you're serving your application from the file system or a custom protocol (like in a Desktop or Native app).
+like when you're serving your application from the file system or a custom protocol (like in a Desktop or Native app).
In situations like this you can disable the iframe fallback and handle the failed refresh_token grant and prompt the user to login interactively with loginWithRedirect or loginWithPopup."
E.g. Using the file: protocol in an Electron application does not support that legacy technique.
let token: string;
try {
token = await auth0.getTokenSilently();
} catch (e) {
if (e.error === 'missing_refresh_token' || e.error === 'invalid_grant') {
auth0.loginWithRedirect();
}
}
-
-Optional workerIf provided, the SDK will load the token worker from this URL instead of the integrated blob. An example of when this is useful is if you have strict
+
OptionalworkerIf provided, the SDK will load the token worker from this URL instead of the integrated blob. An example of when this is useful is if you have strict
Content-Security-Policy (CSP) and wish to avoid needing to set worker-src: blob:. We recommend either serving the worker, which you can find in the module
at <module_path>/dist/auth0-spa-js.worker.production.js, from the same host as your application or using the Auth0 CDN
https://cdn.auth0.com/js/auth0-spa-js/<version>/auth0-spa-js.worker.production.js.
Note: The worker is only used when useRefreshTokens: true, cacheLocation: 'memory', and the cache is not custom.
Note: The worker is only used when useRefreshTokens: true, cacheLocation: 'memory', and the cache is not custom.
The options used when creating an AuthGuard.
+If you need to send custom parameters to the Authorization Server, +
If you need to send custom parameters to the Authorization Server, make sure to use the original parameter name.
-Optional acr_Optional audienceThe default audience to be used for requesting API access.
-Optional connectionThe name of the connection configured for your application. +
Optionalacr_OptionalaudienceThe default audience to be used for requesting API access.
+OptionalconnectionThe name of the connection configured for your application. If null, it will redirect to the Auth0 Login Page and show the Login Widget.
-Optional display'page': displays the UI with a full page view'popup': displays the UI with a popup window'touch': displays the UI in a way that leverages a touch interface'wap': displays the UI with a "feature phone" type interfaceOptionaldisplay'page': displays the UI with a full page view'popup': displays the UI with a popup window'touch': displays the UI in a way that leverages a touch interface'wap': displays the UI with a "feature phone" type interfaceOptional id_Previously issued ID Token.
-Optional invitationThe Id of an invitation to accept. This is available from the user invitation URL that is given when participating in a user invitation flow.
-Optional login_The user's email address or other identifier. When your app knows +
Optionalid_Previously issued ID Token.
+OptionalinvitationThe Id of an invitation to accept. This is available from the user invitation URL that is given when participating in a user invitation flow.
+Optionallogin_The user's email address or other identifier. When your app knows which user is trying to authenticate, you can provide this parameter to pre-fill the email box or select the right session for sign-in.
This currently only affects the classic Lock experience.
-Optional max_Maximum allowable elapsed time (in seconds) since authentication. +
Optionalmax_Maximum allowable elapsed time (in seconds) since authentication. If the last time the user authenticated is greater than this value, the user must be reauthenticated.
-Optional organizationThe organization to log in to.
-This will specify an organization parameter in your user's login request.
OptionalorganizationThe organization to log in to.
+This will specify an organization parameter in your user's login request.
org_), it will be validated against the org_id claim of your user's ID Token. The validation is case-sensitive.org_), it will be validated against the org_name claim of your user's ID Token. The validation is case-insensitive.org_), it will be validated against the org_id claim of your user's ID Token. The validation is case-sensitive.org_), it will be validated against the org_name claim of your user's ID Token. The validation is case-insensitive.
+To use an Organization Name you must have "Allow Organization Names in Authentication API" switched on in your Auth0 settings dashboard.
+More information is available on the Auth0 documentation portalOptional prompt'none': do not prompt user for login or consent on reauthentication'login': prompt user for reauthentication'consent': prompt user for consent before processing request'select_account': prompt user to select an accountOptionalprompt'none': do not prompt user for login or consent on reauthentication'login': prompt user for reauthentication'consent': prompt user for consent before processing request'select_account': prompt user to select an accountOptional redirect_The default URL where Auth0 will redirect your browser to with +
Optionalredirect_The default URL where Auth0 will redirect your browser to with the authentication result. It must be whitelisted in -the "Allowed Callback URLs" field in your Auth0 Application's +the "Allowed Callback URLs" field in your Auth0 Application's settings. If not provided here, it should be provided in the other methods that provide authentication.
-Optional scopeThe default scope to be used on authentication requests.
+OptionalscopeThe default scope to be used on authentication requests.
This defaults to profile email if not set. If you are setting extra scopes and require
profile and email to be included then you must include them in the provided scope.
Note: The openid scope is always applied regardless of this setting.
Optional screen_Provides a hint to Auth0 as to what flow should be displayed. +
Optionalscreen_Provides a hint to Auth0 as to what flow should be displayed. The default behavior is to show a login page but you can override -this by passing 'signup' to show the signup page instead.
+this by passing 'signup' to show the signup page instead.This only affects the New Universal Login Experience.
-Optional ui_The space-separated list of language tags, ordered by preference.
-For example: 'fr-CA fr en'.
Optionalui_The space-separated list of language tags, ordered by preference.
+For example: 'fr-CA fr en'.
Optional authorizationParameters that will be sent back to Auth0 as part of a request.
+OptionalauthorizationParameters that will be sent back to Auth0 as part of a request.
If you need to send custom parameters to the Authorization Server, make sure to use the original parameter name.
-Optional audience?: stringThe audience that was used in the authentication request
-Optional redirect_There's no actual redirect when getting a token silently, +
Optionalaudience?: stringThe audience that was used in the authentication request
+Optionalredirect_There's no actual redirect when getting a token silently,
but, according to the spec, a redirect_uri param is required.
Auth0 uses this parameter to validate that the current origin
matches the redirect_uri origin when sending the response.
It must be whitelisted in the "Allowed Web Origins" in your
-Auth0 Application's settings.
Optional scope?: stringThe scope that was used in the authentication request
-Optional cacheWhen off, ignores the cache and always sends a
+Auth0 Application's settings.
Optionalscope?: stringThe scope that was used in the authentication request
+OptionalcacheWhen off, ignores the cache and always sends a
request to Auth0.
When cache-only, only reads from the cache and never sends a request to Auth0.
Defaults to on, where it both reads from the cache and sends a request to Auth0 as needed.
Optional detailedIf true, the full response from the /oauth/token endpoint (or the cache, if the cache was used) is returned +
OptionaldetailedIf true, the full response from the /oauth/token endpoint (or the cache, if the cache was used) is returned
(minus refresh_token if one was issued). Otherwise, just the access token is returned.
The default is false.
Optional timeoutA maximum number of seconds to wait before declaring the background /authorize call as failed for timeout +
OptionaltimeoutA maximum number of seconds to wait before declaring the background /authorize call as failed for timeout Defaults to 60s.
-Optional authorizationURL parameters that will be sent back to the Authorization Server. This can be known parameters +
OptionalauthorizationURL parameters that will be sent back to the Authorization Server. This can be known parameters defined by Auth0 or custom parameters that you define.
-Optional cacheWhen off, ignores the cache and always sends a request to Auth0.
+
OptionalcacheWhen off, ignores the cache and always sends a request to Auth0.
When cache-only, only reads from the cache and never sends a request to Auth0.
Defaults to on, where it both reads from the cache and sends a request to Auth0 as needed.
Optional allOptional acrOptional addressOptional amrOptional at_Optional audOptional auth_Optional azpOptional birthdateOptional c_Optional cnfOptional emailOptional email_Optional expOptional family_Optional genderOptional given_Optional iatOptional issOptional jtiOptional localeOptional middle_Optional nameOptional nbfOptional nicknameOptional nonceOptional org_Optional org_Optional phone_Optional phone_Optional pictureOptional preferred_Optional profileOptional sidOptional sub_Optional updated_Optional websiteOptional zoneinfoOptionalacrOptionaladdressOptionalamrOptionalat_OptionalaudOptionalauth_OptionalazpOptionalbirthdateOptionalc_OptionalcnfOptionalemailOptionalemail_OptionalexpOptionalfamily_OptionalgenderOptionalgiven_OptionaliatOptionalissOptionaljtiOptionallocaleOptionalmiddle_OptionalnameOptionalnbfOptionalnicknameOptionalnonceOptionalorg_Optionalorg_Optionalphone_Optionalphone_OptionalpictureOptionalpreferred_OptionalprofileOptionalsidOptionalsub_Optionalupdated_OptionalwebsiteOptionalzoneinfoOptional clientThe clientId of your application.
OptionalclientThe clientId of your application.
If this property is not set, then the clientId that was used during initialization of the SDK is sent to the logout endpoint.
If this property is set to null, then no client ID value is sent to the logout endpoint.
Optional logoutParameters to pass to the logout endpoint. This can be known parameters defined by Auth0 or custom parameters +
+OptionallogoutParameters to pass to the logout endpoint. This can be known parameters defined by Auth0 or custom parameters you wish to provide.
If you need to send custom parameters to the logout endpoint, make sure to use the original parameter name.
-Optional federated?: booleanWhen supported by the upstream identity provider, +
Optionalfederated?: booleanWhen supported by the upstream identity provider, forces the user to logout of their identity provider and from Auth0. -Read more about how federated logout works at Auth0
-Optional returnThe URL where Auth0 will redirect your browser to after the logout.
+Read more about how federated logout works at Auth0 +OptionalreturnThe URL where Auth0 will redirect your browser to after the logout.
Note: If the client_id parameter is included, the
returnTo URL that is provided must be listed in the
-Application's "Allowed Logout URLs" in the Auth0 dashboard.
+Application's "Allowed Logout URLs" in the Auth0 dashboard.
However, if the client_id parameter is not included, the
returnTo URL must be listed in the "Allowed Logout URLs" at
the account level in the Auth0 dashboard.
Optional openUsed to control the redirect and not rely on the SDK to do the actual redirect.
+ +OptionalopenUsed to control the redirect and not rely on the SDK to do the actual redirect.
Set to false to disable the redirect, or provide a function to handle the actual redirect yourself.
await auth0.logout({
openUrl(url) {
window.location.replace(url);
}
});
-
-import { Browser } from '@capacitor/browser';
await auth0.logout({
async openUrl(url) {
await Browser.open({ url });
}
});
-
-Optional clientThe clientId of your application.
OptionalclientThe clientId of your application.
If this property is not set, then the clientId that was used during initialization of the SDK is sent to the logout endpoint.
If this property is set to null, then no client ID value is sent to the logout endpoint.
Optional logoutParameters to pass to the logout endpoint. This can be known parameters defined by Auth0 or custom parameters +
+OptionallogoutParameters to pass to the logout endpoint. This can be known parameters defined by Auth0 or custom parameters you wish to provide.
If you need to send custom parameters to the logout endpoint, make sure to use the original parameter name.
-Optional federated?: booleanWhen supported by the upstream identity provider, +
Optionalfederated?: booleanWhen supported by the upstream identity provider, forces the user to logout of their identity provider and from Auth0. -Read more about how federated logout works at Auth0
-Optional returnThe URL where Auth0 will redirect your browser to after the logout.
+Read more about how federated logout works at Auth0 +OptionalreturnThe URL where Auth0 will redirect your browser to after the logout.
Note: If the client_id parameter is included, the
returnTo URL that is provided must be listed in the
-Application's "Allowed Logout URLs" in the Auth0 dashboard.
+Application's "Allowed Logout URLs" in the Auth0 dashboard.
However, if the client_id parameter is not included, the
returnTo URL must be listed in the "Allowed Logout URLs" at
the account level in the Auth0 dashboard.
Optional popupAccepts an already-created popup window to use. If not specified, the SDK +
OptionalpopupAccepts an already-created popup window to use. If not specified, the SDK will create its own. This may be useful for platforms like iOS that have security restrictions around when popups can be invoked (e.g. from a user click event)
-Optional timeoutThe number of seconds to wait for a popup response before +
OptionaltimeoutThe number of seconds to wait for a popup response before throwing a timeout error. Defaults to 60s
-Optional authorizationURL parameters that will be sent back to the Authorization Server. This can be known parameters +
Optional appUsed to store state before doing the redirect
-Optional authorizationURL parameters that will be sent back to the Authorization Server. This can be known parameters +
OptionalappUsed to store state before doing the redirect
+OptionalauthorizationURL parameters that will be sent back to the Authorization Server. This can be known parameters defined by Auth0 or custom parameters that you define.
-Optional fragmentUsed to add to the URL fragment before redirecting
-Optional openUsed to control the redirect and not rely on the SDK to do the actual redirect.
-const client = new Auth0Client({
openUrl(url) {
window.location.replace(url);
}
});
-
-import { Browser } from '@capacitor/browser';
const client = new Auth0Client({
async openUrl(url) {
await Browser.open({ url });
}
});
-
-OptionalfragmentUsed to add to the URL fragment before redirecting
+OptionalopenUsed to control the redirect and not rely on the SDK to do the actual redirect.
+The possible locations where tokens can be stored
-The possible locations where tokens can be stored
+Const Injection token used to provide the Auth0VueClient instance. Can be used to pass to inject()
inject(AUTH0_INJECTION_KEY)
-
-ConstInjection token used to provide the Auth0VueClient instance. Can be used to pass to inject()
inject(AUTH0_INJECTION_KEY)
+
+
+
Error thrown when the wrong DPoP nonce is used and a potential subsequent retry wasn't able to fix it.
+