diff --git a/.version b/.version index 805579f30..327d2cce6 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -v2.11.0 \ No newline at end of file +v2.11.1 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fcceed76..dd70cd633 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## [v2.11.1](https://github.com/auth0/auth0-spa-js/tree/v2.11.1) (2026-01-07) +[Full Changelog](https://github.com/auth0/auth0-spa-js/compare/v2.11.0...v2.11.1) + +**Fixed** +- fix: clear cache when different user logs in without logout [\#1456](https://github.com/auth0/auth0-spa-js/pull/1456) ([yogeshchoudhary147](https://github.com/yogeshchoudhary147)) + ## [v2.11.0](https://github.com/auth0/auth0-spa-js/tree/v2.11.0) (2025-12-11) [Full Changelog](https://github.com/auth0/auth0-spa-js/compare/v2.10.0...v2.11.0) diff --git a/FAQ.md b/FAQ.md index 970c35a53..70383fa85 100644 --- a/FAQ.md +++ b/FAQ.md @@ -124,7 +124,7 @@ If you want to use a CDN bundle together with import maps, you will need to use diff --git a/docs/classes/Auth0Client.html b/docs/classes/Auth0Client.html index 00f7e982d..077ba1eeb 100644 --- a/docs/classes/Auth0Client.html +++ b/docs/classes/Auth0Client.html @@ -1,5 +1,5 @@
Protected _assertProtected _assertawait auth0.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
@@ -33,19 +33,19 @@
means that checkSession could silently return without authenticating the user on page refresh when
using a private tab, despite having previously logged in. As a workaround, use getTokenSilently instead
and handle the possible login_required error as shown in the readme.
Optional options: GetTokenSilentlyOptionsInitiates a redirect to connect the user's account with a specified connection. +
Optional options: GetTokenSilentlyOptionsInitiates a redirect to connect the user's account with a specified connection. This method generates PKCE parameters, creates a transaction, and redirects to the /connect endpoint.
You must enable Offline Access from the Connection Permissions settings to be able to use the connection with Connected Accounts.
Options for the connect account redirect flow.
Resolves when the redirect is initiated.
If the connect request to the My Account API fails.
-Returns a new Fetcher class that will contain a fetchWithAuth() method.
This is a drop-in replacement for the Fetch API's fetch() method, but will
handle certain authentication logic for you, like building the proper auth
headers or managing DPoP nonces and retries automatically.
Check the EXAMPLES.md file for a deeper look into this method.
Exchanges an external subject token for an Auth0 token via a token exchange request.
+Exchanges an external subject token for an Auth0 token via a token exchange request.
The options required to perform the token exchange.
A promise that resolves to the token endpoint response, which contains the issued Auth0 tokens.
@@ -65,41 +65,41 @@Example Usage:
// Define the token exchange options
const options: CustomTokenExchangeOptions = {
subject_token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6Ikp...',
subject_token_type: 'urn:acme:legacy-system-token',
scope: "openid profile",
organization: "org_12345"
};
// Exchange the external token for Auth0 tokens
try {
const tokenResponse = await instance.exchangeToken(options);
// Use tokenResponse.access_token, tokenResponse.id_token, etc.
// The organization ID will be present in the access token payload
} catch (error) {
// Handle token exchange error
}
-Returns a string to be used to demonstrate possession of the private +
Returns a string to be used to demonstrate possession of the private key used to cryptographically bind access tokens with DPoP.
It requires enabling the Auth0ClientOptions.useDpop option.
-Optional nonce?: stringReturns the current DPoP nonce used for making requests to Auth0.
It can return undefined because when starting fresh it will not
be populated until after the first response from the server.
It requires enabling the Auth0ClientOptions.useDpop option.
Optional id: stringThe identifier of a nonce: if absent, it will get the nonce used for requests to Auth0. Otherwise, it will be used to select a specific non-Auth0 nonce.
-const claims = await auth0.getIdTokenClaims();
+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.
-Optional options: GetTokenSilentlyOptionsconst token = await auth0.getTokenWithPopup(options);
+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.
+Optional options: GetTokenSilentlyOptionsconst token = await auth0.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.
const user = await auth0.getUser();
+After the browser redirects back to the callback page, +
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.
const isAuthenticated = await auth0.isAuthenticated();
+try {
await auth0.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
@@ -108,21 +108,21 @@
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 auth0.loginWithRedirect(options);
+Optional options: PopupLoginOptionsOptional config: PopupConfigOptionsawait auth0.loginWithRedirect(options);
Performs a redirect to /authorize using the parameters
provided as arguments. Random and secure state and nonce
parameters will be auto-generated.
await auth0.logout(options);
+await auth0.logout(options);
Clears the application session and performs a redirect to /v2/logout, using
the parameters provided as arguments, to clear the Auth0 session.
If the federated option is specified it also clears the Identity Provider session.
Read more about how Logout works at Auth0.
Sets the current DPoP nonce used for making requests to Auth0.
+Sets the current DPoP nonce used for making requests to Auth0.
It requires enabling the Auth0ClientOptions.useDpop option.
The nonce value.
Optional id: stringThe identifier of a nonce: if absent, it will set the nonce used for requests to Auth0. Otherwise, it will be used to select a specific non-Auth0 nonce.
-
Auth0 SDK for Single Page Applications using Authorization Code Grant Flow with PKCE.
-