diff --git a/.version b/.version index 1e29da15..fd595728 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -v2.16.0 \ No newline at end of file +v2.17.0 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 7496449e..7909ab65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Change Log +## [v2.17.0](https://github.com/auth0/auth0-angular/tree/v2.17.0) (2026-12-02) +[Full Changelog](https://github.com/auth0/auth0-angular/compare/v2.16.0...v2.17.0) + +**Added** +- feat: export NetworkError from auth0-spa-js [\#1142](https://github.com/auth0/auth0-angular/pull/1142) ([yogeshchoudhary147](https://github.com/yogeshchoudhary147)) + +**Note:** this release requires auth0-spa-js 2.31.0, so token request timeouts now throw `TimeoutError` with the message `Timeout`. `NetworkError` and `TimeoutError` both extend `GenericError`, so catch-all `instanceof GenericError` checks now match them. + ## [v2.16.0](https://github.com/auth0/auth0-angular/tree/v2.16.0) (2026-11-13) [Full Changelog](https://github.com/auth0/auth0-angular/compare/v2.15.0...v2.16.0) diff --git a/docs/assets/hierarchy.js b/docs/assets/hierarchy.js index 743ef8ae..7176c7be 100644 --- a/docs/assets/hierarchy.js +++ b/docs/assets/hierarchy.js @@ -1 +1,2 @@ -window.hierarchyData = "eJyVld9vmzAQx/8XP7vrwDZg3qbshyol69R220PVB4scwYpjMxsmVVX+9wnSViYks/OEBN/z58539+UFWWM6h8pHRhimKcekKJ4wslArqDpptEPlCyJFMTy02AEq0Q/T9u3SbKS+bQ8SjLZSr1GZsgyj3ipUIqk7sLWowF3P9B+abqcQRpUSzqESdW59NRxw9R40fGykWlvQqHwknD7tMSKcell8g+7BbEH/ll0zEuKSORcWkdMeI5pyL4WbhagaCAAPoktLppQNJVPKPN7SVELdd8aKDUzRSVq8oUcCuOuZ+GwKhxd7jBhhkwvWYGX1xVpj/wfydQHGpETGGGZ5irOE4owkOGMUZznBGac4TxjOCcMFSXGRFzj5yMhwH4z5GT7IHZi+C2bo6y7KkI9NYHnqQVe1uIM/vbSwDoKPtREt4Ox402KrnInDtCyhx7TbFnQc6l0ZwSGJx/nUdw3oTlZi2Lwg7IQ8gshmlS2ErkCpiLadkEcQc+JPiXRO6s0d1BZcMzpOeFrOxESwJ874es59ZVpwsVRPHebliT+lN/qvUHK9MLqWm97GdfVsUAR9YlMLozVU4fXwdWFGQfyd/+ngc2va70ZXEATNxBG0vJg6TIyzXGxnBc8xTzLMCcOcUczz0VMLnk/hS+k6b+mMjRiis1Hh4nmSHRWvrVFqBzrc1Lk6gjcZn1UtFo1QCvQm3NqZOII2MaJVLX6BlfVzDMpTRnCm9uPfy1dRxTbxdFCYPvyffb8Vzm3heSzg1bej/5mh2FAy+/0/MVmbBw==" \ No newline at end of file +window.hierarchyData = + 'eJyVlslu2zAQht+F50ljiaIk6la4CwJkKZIuhyAHQh5ZhGlSJekWQeB3L+S0AWXFJXMyYP+j759VfiLWGO9Ic88ogyLnQOv6AYjFTmHrpdGONE+E1vX4ocUWSUO+mGE3XJq11DfDswTIRuoVaXJWAtlZRRoitUfbiRbd+Uz/rvdbRYC0SjhHGuLd6mx8wNlL0PhjL9XKoibNPeXFwx4I5UXg4jP6r2aD+of0/YGQZuZUWIKnPZAi54GFi6Voe4wAn0VvTbko2JhyUbCAd2laoe68sWKNU3SW1//QBwK685n4pIXnL/ZAGGWTAmu0sv1orbH/A4W6CGOSImMMWJUD4wsoaQ5lwaGscih5BlWWQ0UpVIxCzRZQ8xKyRZWNNWEsdPlVbtHsfNRlqHuLyzKjB2iVB9Br9L+N3UShoS6h/HwRMK46cYs/d9LiKso51sZZZUaPNzq1kjNxAo3mx7SbAXUa6kWZwCnC9Xy/8z1qL1sxbngU9oo8gVjNMlsK3aJSCW17RZ5A5Fk4JdI5qde32Fl0/eGyxaflREycXWX5nH3XmgFdKjVQJ/BoOKUX+pdQcrU0upPrnU3r6smgBDoL6UujNbbx9Qh1cUbNwp3/5vDDYIZro1uMgmbiBBovpxcm5bK8+WTyjAGnBXBGgVc5cH642zxjU/ildD5YOmMThuhkVDx5Touj5LU1Sm1Rx5s6VyfwJuNz1YllL5RCvY63diZOoE0O0VUnvqOV3WMKKlAmcKbnJ6zLJ9GmNvH1oDh9/A8Q3lvh3AYfDwn8vdvJ78xYbMzMfv8HQ5W8yQ=='; diff --git a/docs/assets/navigation.js b/docs/assets/navigation.js index 41aa0e92..7da659e0 100644 --- a/docs/assets/navigation.js +++ b/docs/assets/navigation.js @@ -1 +1,2 @@ -window.navigationData = "eJy1m8ty2zYUht9Fa6e5NWnrnUeJHc9YsUd2kkWnC5g8EjGmABYA1aidvHtHpCyBuByAALPGf/7v4EYCIPjnfzMF39XsfPZJqWYBquLl7GzWEFXNzmfA2o18eSr5pVKbenY2e6KsnJ3//uPsGL0E2XAm4WHXgBmvlxkOZ7OiJlLOzmdKli+ofAHfFQhG6pnmffEolSCF+ky2dE0UFydAFw3ypSUZcl6/0XO9aFX1al5TYOqSFIqLncPQ0oQce/GcsxVdu/10RcgNmKIFUZSzj0I4a2yLLM+41m1VddUSUboZXVEo2/0IuWYKRAGNu39sUchzwcu2BrdVXxZyuAexpYXH4lAY9FBE+Rz2RVj8nDMGhfJ0oF6a1nOXoIoKHNaHgjTXK2AgaOHJWi9N879mC9hwsZuTonK07KA4lbAlNS37idYKbBZ5pWnkG16Q+l5xQdbgqZ8lSSMtVmRekboGtgZP3SxJMukjE7yuN8B8Y9nWTMDqn7syBqlL08l+UJbvDZVKe1qjVfJok9lL+LulAko/caBI5nwFQVc7P0UrT2RQKSlbL2ElQFYP/Al8U9qnzOLeF7wBb79ZmkTW7qIoeMvURUN9KFOSRrojUj7BLvQEccqyiDgo3/8KFDY2XKos3hLWVCoQOG+gyuJ18+iw5gvM7VBEYh68aZs5YQXUtR9tizJot42/PwflGYwHugHe+l5vliSNhEPy/b9I+NDw5jNnhW9GW5Jkkts8dQ/SNMZCm+43CitS7Nfah8Kh9Zt3780NmLH10i2OxSGT44vX63NUWFbR2y0u6L/dhLwjgmykF2Xo0oDHp/cgeYSMBWSm8HwSgHOfVWmwjxtC6+Hu2DzW0KBedQb8tC49Vum22Tu72zsQM20iaA+EgiZJpV8KjmiQQUBiCp1Z54sMfEuVAzttSxDWSZSDulVNsFZHTQ7orpVVkHQS5aDuNzJIOmpyQF85LSCI0lRpMGQo5AyA55XsPa2BqRqdVh5tHvgbVdVhFRYmm+Jk9H6lcSf4itbok9WpTIMah5fIWsOpxJYdRsCStwri/TU5Brk2jqM0w2vHMVRss1yXXce6ffuyRGN5CSUIoqD8wDeEMqyffeI09A1f81ZhvIECa3V9u96f/jv9bFla5rePEsSWPNawWBEc6ZZiddEi4mqFBcSBDlvYWIwpRyH88fQKRhdFTmVi/6gmFupSpkGjGjHYdKNQsYtvRJ+VwFxAZ4XNYbc0F1vu60FqtG+96iz4yE1HMGrqZGKaZPKth+Ub3nzgIXlp7A9cotpBF2Yhb/iasjEDwhkwYQox1XdHZCWxP/kEib7Uncos6D1ds7YZVXVPSHoa/3BRjnoe+wLyUkh4OuFhk6cT7J1A3FQJxT2hkJjERCrOIH6g+NQZ8LFDBI+ZNhF8cASCJkklYlggAYkpdJ9xuq0lCrZkGbju2R+k6apEWH8mcEmhLu94TYudm2bJEnGtrD5zdfwSFz/TIgKnSWns/IsO/2np4bMyPn7qBCPmalxsWmJLKPgWxG7Oy/gneigoP5WR4ysu9KekhY6ryNgpEwuPp4i41IRKKqBQh8uKh2McPBUkIi+J4LvBJcQOgZaw5U+g3xTC3T3qtFo9cNVET0+fOB09cjriIZOmgU6/QMwUiYSnG6JPS+BLUxLlfO4etqPONIJROcloH07COdjiRPTJx007lacB+r5CPvfpgjTEN3jcdwm7q4lacbGJnuMxgXkpLTnZULYenRESl3gJpqHdd6sPsKKM7t1OfLVruks/psIgvfrjt9fv3nj/mjBrdXAN16D3jb7KY7oN/3/xU+1/YRLJXASQvSCd1X0d3H9eMRnHggzvwSLh+fW9BNnWysIh2uwMoDz4eqjH8tAonLdS8U33A8aCMroh9W2rmtb29egyatI59vdavxcVcb3QdbZLmU6PWU709OhVRB7dXkV48Z7FQxI/jJ2S5lmqmEhshTKaa748dZjzvTmCcPhxybz90CMGhemM7u4EKRTd9jdgPxFW1vp11p7mkaVzFyvS3/RxPa8HhVmMK0GY8iCOZemEW/44rwhjUJv+p5J0d+N+vmdgu1XZ1OFnJw90KJqGiVcT2cyO5xnflzxIQzU1Fa+vWzxRDjHobKJ+RLDgpdXKZnk6qX+Hs7Lh1P/qcYry1p6HP6OtH2y3RND9inDw/7TzT9u35tK9f6wHHAcixNDfAyc/vBfexjUGef5D+lLbwaxaVnRD6KVWPLR//6thYtzq89tZQsSYmvfiXKaWyDSMaggqY64x6tTYe4yDGjWCb2l/Qv3KZauXWzZ//Q/6MteP" \ No newline at end of file +window.navigationData = + 'eJy1m8ty2zYUht9Fa6e5NWnrnUeJHc9YsUd2kkWnC5g8EjGmABYAlaidvntHpCyBuByAALPGf/7vgLgQAME//50p+KFm57NPSjULUBUvZ2ezhqhqdj4D1m7ky1PJL5Xa1LOz2RNl5ez89//OjtFLkA1nEh52DZjxepnhcDYraiLl7HymZPmCyhfwQ4FgpJ5p3hePUglSqM9kS9dEcXECdNEgX1qSIef1Gz3Xi1ZVr+Y1BaYuSaG42DkMLU3IsRfPOVvRtdtPV4TcgClaEEU5+yiEs8a2yPKMe7qtqq5aIko3oysKZbvvIddMgSigcbePLQp5LnjZ1uC26stCDvcgtrTwWBwKgx6KKJ/DvgiLn3PGoFCeBtRL01ruElRRgcP6UJDmegUMBC08Weulaf7XbAEbLnZzUlSOJzsoTiVsSU3LfqC1AhtFXmka+YYXpL5XXJA1eOpnSdJIixWZV6Suga3BUzdLkkz6yASv6w0wX1+2NROw+nlXxiB1aTrZD8ryvaFSabM1WiWPNpm9hL9bKqD0EweKZM5XEHS181O08kQGlZKy9RJWAmT1wJ/AN6R9yizufcEb8LabpUlk7S6KgrdMXTTUhzIlaaTPoL5z8eSB6KVp/ndEyifYhWYopyyLiIPy/a9AYX3PpcriLWFNpQKB8waqLF43Tg9rysDcEYpIzIM3bTMnrIC69qNtUQbttvG356A8g/FAN8Bb3+vTkqSRcEi+/xcJHxrefOas8I1oS5JMcpun7nGaxljI0/1GZEWK/Vr+UDi0fvPuvbnBM7Z2usWxOGRyfLF7fY4Kyyp6O8cF/acbkHdEkI30ogxdGvA4ew+SR8hYQGYKzycNOPdZlQb7uCG0Hu6+zWMTDepVZ8BP695jlW6bvbP7eQdipk0EbYFQ0CSp9EvNEQ9kEJCYQmfW+SId31LlwE7bHoR1EuWgblUTrNVRkwO6a2UVJJ1EOaj7jQySjpoc0FdOCwiiNFUaDOkKOR3geSV7T2tgqkaHlUebB/5GVXVYhYXJpjgZvV9p3Am+ojU6szqVaVDjcBRZaziV2LLDCFjyVkG8vybHINfGcZdmeO045op9LNdl17Bu374s0VheQgmCKCg/8A2hDGtnnzgNfcPXvFUYb6DAnrp+HNB/XXD62bK0zG8fJYgteaxhsSI40i3F6qJFxNUKC4gDHbawsRhTjkL44+kVjC6KnMrE9lFNLNSlTINGPcTgoxuFil18I/qsBOYCOitsDLuludhyXw9So23rVWfBR246glFTJxPzSCbfeli+4c0HHpKXxv7AJeo56MIs5A1fUzamQzgDJkwhpvruiKwk9iefINGXulOZBb2na9Y2o6ruCUlP4zsX5aj52BeQl0LC7ISHTZ5OsHUCcVMlFDdDITGJiVScQXxH8akz4GO7CB4zbSJ45wgETZJKRLdAAhJT6D7jdFtLFGzJMnDd3B+k6apEWH8mcEmhLu94TYudm2bJEnGtrD5zdfwSFz/SIgKnSWns+IsO/2np4aMyPn7qBCPGalxsWmJLKPgWxG7Oy/gZPRSUn8rI/hUX+lPSQvtVZOyUiYX7U0RcakIlFVCow2XIwzEOngoSkZdE8N3gEmKHQEvY8ifQbyLh7h51Wq0euGqih6dPnI4eORzxkEnTQIdfIGaKRMLDDdGnJfClKYlyzruH7agzjWBUTjLah5NwDrY4EX3ycdNO5WmAvq2Qz326IA3xDR73TcLuaqJWXGyix3hMYF5KS042lK1HZ4TEJV6CaWj33eoDrCije7cTX+2a7tKPqTBIr/747fW7N96/MsxaHVzDNeh9o6/ymG7D/2v8VPtfm0QyFwFkL0hndV8H959XTMaxIMN7sEh4fn0vQba1snCINjsDKA++HuqxPNQL561UfNP94LGgjG5IfduqprV9PbqMmnSO/b3WH0VFXC90ne1SptNjlhM9PXoVkUe3VxFevGfxkMQPY6ekeZYqJhJboYzmmi9PHeZ8b44gHH6MMm8/9IhBYTqjuztBCkW3/Q3YT4SVtX6dtad5ZOncxYr0N31c8/WgMItxJQhTHsSxLJ1wyx/nFWEMatP/VJLubtzP93RstyqbOvzs5IEORdMw8Woim9nxPOP7kgdpqKam4vV1iyfKIQadTdSPCBa8tJ6yWZ5O6t/hrGw49b96nKK8tefhz2vrB94tEXS/Ihz8n+38k/etuXTvp/WA40CEGPpb4OSHt8LbuIdBnv/AvtR2MKuWFV0XeqkVD+3f/2qYGLf6/HaWEDGm5r04l6klMg2jHgSVMdcYdWrsPcZBjRrBt7Q/oX7lstXLLZu//genS/iQ'; diff --git a/docs/classes/AbstractNavigator.html b/docs/classes/AbstractNavigator.html index 8d60ba1a..fd33ce9a 100644 --- a/docs/classes/AbstractNavigator.html +++ b/docs/classes/AbstractNavigator.html @@ -1,89 +1,592 @@ -
+ Navigates to the specified url. The router will be used
+ if one is available, otherwise it falls back to
+ window.history.replaceState.
+
The url to navigate to
+StaticcreateStaticcreateGets and sets configuration for the internal Auth0 client. This can be -used to provide configuration outside of using AuthModule.forRoot, i.e. from -a factory provided by APP_INITIALIZER.
-// app.module.ts
// ---------------------------
import { AuthModule, AuthClientConfig } from '@auth0/auth0-angular';
// Provide an initializer function that returns a Promise
function configInitializer(
http: HttpClient,
config: AuthClientConfig
) {
return () =>
http
.get('/config')
.toPromise()
.then((loadedConfig: any) => config.set(loadedConfig)); // Set the config that was loaded asynchronously here
}
// Provide APP_INITIALIZER with this function. Note that there is no config passed to AuthModule.forRoot
imports: [
// other imports..
HttpClientModule,
AuthModule.forRoot(), //<- don't pass any config here
],
providers: [
{
provide: APP_INITIALIZER,
useFactory: configInitializer, // <- pass your initializer function here
deps: [HttpClient, AuthClientConfig],
multi: true,
},
],
+
+
+
+
+
+ AuthClientConfig | @auth0/auth0-angular
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class AuthClientConfig
+
+
+
+
+ Gets and sets configuration for the internal Auth0 client. This
+ can be used to provide configuration outside of using
+ AuthModule.forRoot, i.e. from a factory provided by
+ APP_INITIALIZER.
+
+
+
+
+
+ Usage
+
+ // app.module.ts
// ---------------------------
import { AuthModule, AuthClientConfig } from '@auth0/auth0-angular';
// Provide an initializer function that returns a Promise
function configInitializer(
http: HttpClient,
config: AuthClientConfig
) {
return () =>
http
.get('/config')
.toPromise()
.then((loadedConfig: any) => config.set(loadedConfig)); // Set the config that was loaded asynchronously here
}
// Provide APP_INITIALIZER with this function. Note that there is no config passed to AuthModule.forRoot
imports: [
// other imports..
HttpClientModule,
AuthModule.forRoot(), //<- don't pass any config here
],
providers: [
{
provide: APP_INITIALIZER,
useFactory: configInitializer, // <- pass your initializer function here
deps: [HttpClient, AuthClientConfig],
multi: true,
},
],
-
-
-
-
-
-
-Constructors
-
-
-constructor
-
--
-
-
-
-
Parameters
-
-Optionalconfig: AuthConfig
-Returns AuthClientConfig
-
-Methods
-
-
-get
-
--
-
-
-
Gets the config that has been set by other consumers of the service
-
-Returns AuthConfig
-
-set
-
--
-
-
-
Sets configuration to be read by other consumers of the service (see usage notes)
-
-
-Parameters
-
-- config: AuthConfig
-
The configuration to set
-
-Returns void
-
-
+ Optionalconfig:
+ AuthConfig
+ + Gets the config that has been set by other consumers of + the service +
++ Sets configuration to be read by other consumers of the + service (see usage notes) +
+The configuration to set
+Identifies and handles a given HTTP request.
-The outgoing request object to handle.
-The next interceptor in the chain, or the backend -if no interceptors remain in the chain.
-An observable of the event stream.
-Identifies and handles a given HTTP request.
+The outgoing request object to handle.
++ The next interceptor in the chain, or the backend + if no interceptors remain in the chain. +
+An observable of the event stream.
+ +StaticforInitialize the authentication module system. Configuration can either be specified here, -or by calling AuthClientConfig.set (perhaps from an APP_INITIALIZER factory function).
-Optionalconfig: AuthConfig
-The optional configuration for the SDK.
-Staticfor+ Initialize the authentication module system. + Configuration can either be specified here, or by + calling AuthClientConfig.set (perhaps from an + APP_INITIALIZER factory function). +
+Optionalconfig:
+ AuthConfig
+ The optional configuration for the SDK.
+ReadonlyappEmits the value (if any) that was passed to the loginWithRedirect method call
-but only after handleRedirectCallback is first called
Readonlyerror$Emits errors that occur during login, or when checking for an active session on startup.
-ReadonlyidEmits ID token claims when authenticated, or null if not authenticated.
-ReadonlyisEmits boolean values indicating the authentication state of the user. If true, it means a user has authenticated.
-This depends on the value of isLoading$, so there is no need to manually check the loading state of the SDK.
ReadonlyisEmits boolean values indicating the loading state of the SDK.
-ReadonlymfaProvides MFA (Multi-Factor Authentication) operations as Observables.
-These methods are available after getAccessTokenSilently throws an MfaRequiredError.
-Use the mfa_token from the error to call these methods.
ReadonlymyProvides MyAccount API operations as Observables.
-Allows the authenticated user to list, enroll, update, and delete their
-authentication methods, and to read and update their profile. Requires an
-access token with the appropriate
-read/create/update/delete:me:authentication_methods scopes, and
-read:me:profile / update:me:profile for the profile methods.
ReadonlypasskeyProvides Passkey (WebAuthn) authentication as Observables.
-signup, continueSignup and login handle the full WebAuthn
-challenge-response flow internally. getSignupChallenge,
-getLoginChallenge and getTokenWithPasskey are granular APIs that let
-the app run the WebAuthn ceremony itself.
Methods that return tokens update the authentication state on success to -ensure consistency with the standard authentication flows. The challenge -methods do not change the authentication state.
-Readonlyuser$Emits details about the authenticated user, or null if not authenticated.
-connectAccountWithRedirect({
connection: 'google-oauth2',
scopes: ['openid', 'profile', 'email', 'https://www.googleapis.com/auth/drive.readonly'],
authorization_params: {
// additional authorization params to forward to the authorization server
}
});
+
+
+
+
+
+ AuthService | @auth0/auth0-angular
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class AuthService<TAppState>
+
+
+ Type Parameters
+
+
+
+ Implements
+
+ - OnDestroy
+
+
+
+
+
+
+
+
+ Index
+
+
+
+
+ Constructors
+
+
+ constructor
+
+
+
+
+ Properties
+
+
+ app State$
+ error$
+ id Token Claims$
+ is Authenticated$
+ is Loading$
+ mfa
+ my Account
+ passkey
+ user$
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+
+
+
+
+ Constructors
+
+
+
+
+
+ constructor
+
+
+ -
+
+ new
+ AuthService<TAppState
+ extends
+ AppState
+ =
+ AppState>(
auth0Client:
+ Auth0Client,
configFactory:
+ AuthClientConfig,
navigator:
+ AbstractNavigator,
authState:
+ AuthState,
):
+ AuthService<TAppState>
+
+
+
+ Type Parameters
+
+
+
+ Parameters
+
+ -
+ auth0Client:
+ Auth0Client
+
+ -
+ configFactory:
+ AuthClientConfig
+
+ -
+ navigator:
+ AbstractNavigator
+
+ -
+ authState:
+ AuthState
+
+
+
+
+ Returns
+ AuthService<TAppState>
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties
+
+
+
+
+
+ Readonlyapp State$
+
+
+
+
+ Emits the value (if any) that was passed to the
+ loginWithRedirect method call but only
+ after handleRedirectCallback is
+ first called
+
+
+
+
+
+
+ Readonlyerror$
+
+
+ error$:
+ Observable<Error> = ...
+
+
+
+ Emits errors that occur during login, or when checking for an
+ active session on startup.
+
+
+
+
+
+
+ Readonlyid Token Claims$
+
+
+
+
+ Emits ID token claims when authenticated, or null if not
+ authenticated.
+
+
+
+
+
+
+ Readonlyis Authenticated$
+
+
+ isAuthenticated$:
+ Observable<boolean> = ...
+
+
+
+ Emits boolean values indicating the authentication state of
+ the user. If true, it means a user has
+ authenticated. This depends on the value of
+ isLoading$, so there is no need to manually check
+ the loading state of the SDK.
+
+
+
+
+
+
+ Readonlyis Loading$
+
+
+ isLoading$:
+ Observable<boolean> = ...
+
+
+
+ Emits boolean values indicating the loading state of the SDK.
+
+
+
+
+
+
+ Readonlymfa
+
+
+
+
+ Provides MFA (Multi-Factor Authentication) operations as
+ Observables.
+
+
+ These methods are available after
+ getAccessTokenSilently throws an
+ MfaRequiredError. Use the
+ mfa_token from the error to call these methods.
+
+
+
+
+
+
+ Readonlymy Account
+
+
+
+ Provides MyAccount API operations as Observables.
+
+ Allows the authenticated user to list, enroll, update, and
+ delete their authentication methods, and to read and update
+ their profile. Requires an access token with the appropriate
+ read/create/update/delete:me:authentication_methods
+ scopes, and read:me:profile /
+ update:me:profile for the profile methods.
+
+
+
+
+
+
+ Readonlypasskey
+
+
+
+
+ Provides Passkey (WebAuthn) authentication as Observables.
+
+
+ signup, continueSignup and
+ login handle the full WebAuthn challenge-response
+ flow internally. getSignupChallenge,
+ getLoginChallenge and
+ getTokenWithPasskey are granular APIs that let
+ the app run the WebAuthn ceremony itself.
+
+
+ Methods that return tokens update the authentication state on
+ success to ensure consistency with the standard authentication
+ flows. The challenge methods do not change the authentication
+ state.
+
+
+
+
+
+
+ Readonlyuser$
+
+
+
+
+ Emits details about the authenticated user, or null if not
+ authenticated.
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+ connect Account With Redirect
+
+
+ -
+
+ connectAccountWithRedirect(
options:
+ RedirectConnectAccountOptions<TAppState>,
):
+ Observable<void>
+
+
+
+ connectAccountWithRedirect({
connection: 'google-oauth2',
scopes: ['openid', 'profile', 'email', 'https://www.googleapis.com/auth/drive.readonly'],
authorization_params: {
// additional authorization params to forward to the authorization server
}
});
-Redirects to the /connect URL using the parameters
-provided as arguments. This then redirects to the connection's login page
-where the user can authenticate and authorize the account to be connected.
-If connecting the account is successful, handleRedirectCallback will be called
-with the details of the connected account.
-
-
-Parameters
-
-- options: RedirectConnectAccountOptions<TAppState>
-
The connect account options
-
-Returns Observable<void>
-
-create Fetcher
-
--
-createFetcher<TOutput extends CustomFetchMinimalOutput = Response>(
config?: FetcherConfig<TOutput>,
): Fetcher<TOutput>
-
-const fetcher = createFetcher(config);
+
+ Redirects to the /connect URL using the
+ parameters provided as arguments. This then redirects to
+ the connection's login page where the user can
+ authenticate and authorize the account to be connected.
+
+
+ If connecting the account is successful,
+ handleRedirectCallback will be called with
+ the details of the connected account.
+
+
+
+ Parameters
+
+ -
+ options:
+ RedirectConnectAccountOptions<TAppState>
+
+
The connect account options
+
+
+
+
+
+ Returns Observable<void>
+
+
+
+
+
+
+
+
+ create Fetcher
+
+
+ -
+
+ createFetcher<TOutput
+ extends
+ CustomFetchMinimalOutput
+ =
+ Response>(
config?:
+ FetcherConfig<TOutput>,
):
+ Fetcher<TOutput>
+
+
+
+ const fetcher = createFetcher(config);
-Creates a custom fetcher instance that can be used to make authenticated
-HTTP requests. The fetcher automatically handles token refresh and can
-be configured with custom request/response handling.
-
-
-Type Parameters
-
-- TOutput extends CustomFetchMinimalOutput = Response
-
-Parameters
-
-Optionalconfig: FetcherConfig<TOutput>
-Optional configuration for the fetcher
-
-Returns Fetcher<TOutput>
A Fetcher instance configured with the Auth0 client.
-
-
-generate Dpop Proof
-
--
-generateDpopProof(
params: {
accessToken: string;
method: string;
nonce?: string;
url: string;
},
): Observable<string>
-
-generateDpopProof(params).subscribe(proof => ...)
+
+ Creates a custom fetcher instance that can be used to
+ make authenticated HTTP requests. The fetcher
+ automatically handles token refresh and can be
+ configured with custom request/response handling.
+
+
+
+ Type Parameters
+
+ -
+ TOutput
+ extends
+ CustomFetchMinimalOutput
+ =
+ Response
+
+
+
+
+ Parameters
+
+ -
+
Optionalconfig:
+ FetcherConfig<TOutput>
+
+ Optional configuration for the fetcher
+
+
+
+
+
+ Returns
+ Fetcher<TOutput>
+
+ A Fetcher instance configured with the Auth0 client.
+
+
+
+
+
+
+
+ generate Dpop Proof
+
+
+ -
+
+ generateDpopProof(
params:
+ {
accessToken:
+ string;
method:
+ string;
nonce?:
+ string;
url:
+ string;
},
):
+ Observable<string>
+
+
+
+ generateDpopProof(params).subscribe(proof => ...)
-Generates a DPoP (Demonstrating Proof-of-Possession) proof JWT.
-This proof is used to bind access tokens to a specific client, providing
-an additional layer of security for token usage.
-
-
-Parameters
-
-- params: { accessToken: string; method: string; nonce?: string; url: string }
-
Configuration for generating the DPoP proof
-
-
--
-
accessToken: string
-The access token to bind to the proof
-
--
-
method: string
-The HTTP method (e.g., 'GET', 'POST')
-
--
-
Optionalnonce?: string
-Optional DPoP nonce from the authorization server
-
--
-
url: string
-The URL of the resource server endpoint
-
-Returns Observable<string>
An Observable that emits the generated DPoP proof as a JWT string.
-
-
-get Access Token Silently
-
--
-getAccessTokenSilently(
options: GetTokenSilentlyOptions & { detailedResponse: true },
): Observable<GetTokenSilentlyVerboseResponse | undefined>
-
-Fetches a new access token and returns the response from the /oauth/token endpoint, omitting the refresh token.
-
-
-Parameters
-
-- options: GetTokenSilentlyOptions & { detailedResponse: true }
-
The options for configuring the token fetch.
-
-Returns Observable<GetTokenSilentlyVerboseResponse | undefined>
--
-
-
-
Fetches a new access token and returns it.
-
-
-Parameters
-
-Optionaloptions: GetTokenSilentlyOptions
-The options for configuring the token fetch.
-
-Returns Observable<string | undefined>
-
-get Access Token With Popup
-
--
-
-
-
getTokenWithPopup(options).subscribe(token => ...)
+
+ Generates a DPoP (Demonstrating Proof-of-Possession)
+ proof JWT. This proof is used to bind access tokens to a
+ specific client, providing an additional layer of
+ security for token usage.
+
+
+
+ Parameters
+
+ -
+ params:
+ {
+ accessToken:
+ string;
+ method:
+ string;
+ nonce?:
+ string;
+ url:
+ string
+ }
+
+
Configuration for generating the DPoP proof
+
+
+ -
+
+ accessToken: string
+
+
+ The access token to bind to the proof
+
+
+ -
+
+ method: string
+
+
+ The HTTP method (e.g., 'GET', 'POST')
+
+
+ -
+
+ Optionalnonce?: string
+
+
+
+ Optional DPoP nonce from the authorization
+ server
+
+
+
+ -
+
+ url: string
+
+
+ The URL of the resource server endpoint
+
+
+
+
+
+
+
+ Returns Observable<string>
+
+
+ An Observable that emits the generated DPoP proof as a JWT
+ string.
+
+
+
+
+
+
+
+
+ get Access Token Silently
+
+
+ -
+
+ getAccessTokenSilently(
options:
+ GetTokenSilentlyOptions
+ &
+ {
+ detailedResponse:
+ true
+ },
):
+ Observable<GetTokenSilentlyVerboseResponse
+ |
+ undefined>
+
+
+
+
+ Fetches a new access token and returns the response from
+ the /oauth/token endpoint, omitting the refresh token.
+
+
+
+ Parameters
+
+ -
+ options:
+ GetTokenSilentlyOptions
+ &
+ {
+ detailedResponse:
+ true
+ }
+
+
The options for configuring the token fetch.
+
+
+
+
+
+ Returns Observable<GetTokenSilentlyVerboseResponse
+ |
+ undefined>
+
+
+
+
+ -
+
+ getAccessTokenSilently(
options?:
+ GetTokenSilentlyOptions,
):
+ Observable<string
+ |
+ undefined>
+
+
+
+ Fetches a new access token and returns it.
+
+
+ Parameters
+
+ -
+
Optionaloptions:
+ GetTokenSilentlyOptions
+
+ The options for configuring the token fetch.
+
+
+
+
+
+ Returns Observable<string
+ |
+ undefined>
+
+
+
+
+
+
+
+
+ get Access Token With Popup
+
+
+ -
+
+ getAccessTokenWithPopup(
options?:
+ GetTokenWithPopupOptions,
):
+ Observable<string
+ |
+ undefined>
+
+
+
+ getTokenWithPopup(options).subscribe(token => ...)
-Get an access token interactively.
-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.
-
-
-Parameters
-
-Optionaloptions: GetTokenWithPopupOptions
-Returns Observable<string | undefined>
-
-get Dpop Nonce
-
--
-
-
-
getDpopNonce(id).subscribe(nonce => ...)
+ Get an access token interactively.
+
+ 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.
+
+
+
+ Parameters
+
+ -
+
Optionaloptions:
+ GetTokenWithPopupOptions
+
+
+
+
+ Returns Observable<string
+ |
+ undefined>
+
+
+
+
+
+
+
+
+ get Dpop Nonce
+
+
+ -
+
+
+
+
getDpopNonce(id).subscribe(nonce => ...)
-Gets the DPoP nonce for the specified domain or the default domain.
-The nonce is used in DPoP proof generation for token binding.
-
-
-Parameters
-
-Optionalid: string
-Optional identifier for the domain. If not provided, uses the default domain.
-
-Returns Observable<string | undefined>
An Observable that emits the DPoP nonce string or undefined if not available.
-
-
-handle Redirect Callback
-
--
-handleRedirectCallback(
url?: string,
): Observable<
RedirectLoginResult<TAppState>
| ConnectAccountRedirectResult<TAppState>,
>
-
-handleRedirectCallback(url).subscribe(result => ...)
+
+ Gets the DPoP nonce for the specified domain or the
+ default domain. The nonce is used in DPoP proof
+ generation for token binding.
+
+
+
+ Parameters
+
+ -
+
Optionalid:
+ string
+
+
+ Optional identifier for the domain. If not
+ provided, uses the default domain.
+
+
+
+
+
+
+ Returns Observable<string
+ |
+ undefined>
+
+
+ An Observable that emits the DPoP nonce string or
+ undefined if not available.
+
+
+
+
+
+
+
+
+ handle Redirect Callback
+
+
+ -
+
+ handleRedirectCallback(
url?:
+ string,
):
+ Observable<
RedirectLoginResult<TAppState>
|
+ ConnectAccountRedirectResult<TAppState>,
>
+
+
+
+ handleRedirectCallback(url).subscribe(result => ...)
-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.
-Calling this method also refreshes the authentication and user states.
-
-
-Parameters
-
-Optionalurl: string
-The URL to that should be used to retrieve the state and code values. Defaults to window.location.href if not given.
-
-Returns Observable<
RedirectLoginResult<TAppState>
| ConnectAccountRedirectResult<TAppState>,
>
-
-login With Custom Token Exchange
-
--
-loginWithCustomTokenExchange(
options: CustomTokenExchangeOptions,
): Observable<TokenEndpointResponse>
-
-loginWithCustomTokenExchange(options).subscribe(tokenResponse => ...)
+
+ 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.
+
+
+ Calling this method also refreshes the authentication
+ and user states.
+
+
+
+ Parameters
+
+ -
+
Optionalurl:
+ string
+
+
+ The URL to that should be used to retrieve the
+ state and code values.
+ Defaults to window.location.href if
+ not given.
+
+
+
+
+
+
+ Returns Observable<
RedirectLoginResult<TAppState>
|
+ ConnectAccountRedirectResult<TAppState>,
>
+
+
+
+
+
+
+
+
+ login With Custom Token Exchange
+
+
+ -
+
+ loginWithCustomTokenExchange(
options:
+ CustomTokenExchangeOptions,
):
+ Observable<TokenEndpointResponse>
+
+
+
+ loginWithCustomTokenExchange(options).subscribe(tokenResponse => ...)
-Exchanges an external subject token for Auth0 tokens and establishes an authenticated session.
-This method implements the token exchange grant as specified in RFC 8693.
-It performs a token exchange by sending a request to the /oauth/token endpoint
-with the external token and returns Auth0 tokens (access token, ID token, etc.).
-The request includes the following parameters:
-
-grant_type: Hard-coded to "urn:ietf:params:oauth:grant-type:token-exchange"
-subject_token: The external token to be exchanged
-subject_token_type: A namespaced URI identifying the token type (must be under your organization's control)
-audience: The target audience (falls back to the SDK's default audience if not provided)
-scope: Space-separated list of scopes (merged with the SDK's default scopes)
-
-After a successful token exchange, this method updates the authentication state
-to ensure consistency with the standard authentication flows.
-
-
-Parameters
-
-- options: CustomTokenExchangeOptions
-
The options required to perform the token exchange
-
-Returns Observable<TokenEndpointResponse>
An Observable that emits the token endpoint response containing Auth0 tokens
-
-
-login With Popup
-
--
-
-
-
await loginWithPopup(options);
+
+ Exchanges an external subject token for Auth0 tokens and
+ establishes an authenticated session.
+
+
+ This method implements the token exchange grant as
+ specified in RFC 8693. It performs a token exchange by
+ sending a request to the
+ /oauth/token endpoint with the external
+ token and returns Auth0 tokens (access token, ID token,
+ etc.).
+
+ The request includes the following parameters:
+
+ -
+
grant_type: Hard-coded to
+ "urn:ietf:params:oauth:grant-type:token-exchange"
+
+ -
+
subject_token: The external token to be
+ exchanged
+
+ -
+
subject_token_type: A namespaced URI
+ identifying the token type (must be under your
+ organization's control)
+
+ -
+
audience: The target audience (falls back
+ to the SDK's default audience if not provided)
+
+ -
+
scope: Space-separated list of scopes
+ (merged with the SDK's default scopes)
+
+
+
+ After a successful token exchange, this method updates
+ the authentication state to ensure consistency with the
+ standard authentication flows.
+
+
+
+ Parameters
+
+ -
+ options:
+ CustomTokenExchangeOptions
+
+
+ The options required to perform the token exchange
+
+
+
+
+
+
+ Returns Observable<TokenEndpointResponse>
+
+
+ An Observable that emits the token endpoint response
+ containing Auth0 tokens
+
+
+
+
+
+
+
+
+ login With Popup
+
+
+ -
+
+ loginWithPopup(
options?:
+ PopupLoginOptions,
config?:
+ PopupConfigOptions,
):
+ Observable<void>
+
+
+
+ await loginWithPopup(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.
-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.
-
-
-Parameters
-
-Optionaloptions: PopupLoginOptions
-The login options
-
-Optionalconfig: PopupConfigOptions
-Configuration for the popup window
-
-Returns Observable<void>
-
-login With Redirect
-
--
-
-
-
loginWithRedirect(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.
+
+
+ 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.
+
+
+
+ Parameters
+
+ -
+
Optionaloptions:
+ PopupLoginOptions
+
+ The login options
+
+
+ -
+
Optionalconfig:
+ PopupConfigOptions
+
+ Configuration for the popup window
+
+
+
+
+
+ Returns Observable<void>
+
+
+
+
+
+
+
+
+ login With Redirect
+
+
+ -
+
+
+
+
loginWithRedirect(options);
-Performs a redirect to /authorize using the parameters
-provided as arguments. Random and secure state and nonce
-parameters will be auto-generated.
-
-
-Parameters
-
-Optionaloptions: RedirectLoginOptions<TAppState>
-The login options
-
-Returns Observable<void>
-
-logout
-
--
-
-
-
logout();
+
+ Performs a redirect to /authorize using the
+ parameters provided as arguments. Random and secure
+ state and nonce parameters
+ will be auto-generated.
+
+
+
+ Parameters
+
+ -
+
Optionaloptions:
+ RedirectLoginOptions<TAppState>
+
+ The login options
+
+
+
+
+
+ Returns Observable<void>
+
+
+
+
+
+
+
+
+ logout
+
+
+ -
+
+
+
+
logout();
-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.
-If the openUrl option is set to false, it only clears the application session.
-It is invalid to set both the federated to true and openUrl to false,
-and an error will be thrown if you do.
-Read more about how Logout works at Auth0.
-
-
-Parameters
-
-Optionaloptions: LogoutOptions
-The logout options
-
-Returns Observable<void>
-
-ng On Destroy
-
--
-
-
-
Called when the service is destroyed
-
-Returns void
-
-revoke Refresh Token
-
--
-
-
-
revokeRefreshToken(options).subscribe(() => ...)
+
+ 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. If the
+ openUrl option is set to false, it only
+ clears the application session. It is invalid to set
+ both the federated to true and
+ openUrl to false, and an error
+ will be thrown if you do.
+ Read more about how Logout works at Auth0.
+
+
+
+ Parameters
+
+ -
+
Optionaloptions:
+ LogoutOptions
+
+ The logout options
+
+
+
+
+
+ Returns Observable<void>
+
+
+
+
+
+
+
+
+ ng On Destroy
+
+
+ -
+
+
+
+
Called when the service is destroyed
+
+
+ Returns void
+
+
+
+
+
+
+
+
+ revoke Refresh Token
+
+
+ -
+
+
+
+
revokeRefreshToken(options).subscribe(() => ...)
-Revokes the refresh token using the /oauth/revoke endpoint, so it can no
-longer be used to obtain new access tokens. With the default (offline)
-refresh tokens, the cached access token is kept and remains valid until it
-expires.
-If useRefreshTokens is not enabled, this is a no-op.
-When using Multi-Resource Refresh Tokens (MRRT), a single refresh token may
-cover multiple audiences, so revoking it affects all of them.
-When refreshTokenMode is RefreshTokenMode.Online, revoking the Online Refresh
-Token also terminates the Auth0 session and clears the local cache, so
-isAuthenticated$ emits false and user$ emits null.
-To terminate the user's session with a redirect, use logout instead.
-
-
-Parameters
-
-Optionaloptions: RevokeRefreshTokenOptions
-Identifies which refresh token to revoke. Defaults to the audience configured in authorizationParams.
-
-Returns Observable<void>
-
-set Dpop Nonce
-
--
-
-
-
setDpopNonce(nonce, id).subscribe(() => ...)
+
+ Revokes the refresh token using the
+ /oauth/revoke endpoint, so it can no longer
+ be used to obtain new access tokens. With the default
+ (offline) refresh tokens, the cached access token is
+ kept and remains valid until it expires.
+
+
+ If useRefreshTokens is not enabled, this is
+ a no-op.
+
+
+ When using Multi-Resource Refresh Tokens (MRRT), a
+ single refresh token may cover multiple audiences, so
+ revoking it affects all of them.
+
+
+ When refreshTokenMode is
+ RefreshTokenMode.Online, revoking the
+ Online Refresh Token also terminates the Auth0 session
+ and clears the local cache, so
+ isAuthenticated$ emits
+ false and user$ emits
+ null.
+
+
+ To terminate the user's session with a redirect, use
+ logout instead.
+
+
+
+ Parameters
+
+ -
+
Optionaloptions:
+ RevokeRefreshTokenOptions
+
+
+ Identifies which refresh token to revoke. Defaults
+ to the audience configured in
+ authorizationParams.
+
+
+
+
+
+
+ Returns Observable<void>
+
+
+
+
+
+
+
+
+ set Dpop Nonce
+
+
+ -
+
+
+
+
setDpopNonce(nonce, id).subscribe(() => ...)
-Sets the DPoP nonce for the specified domain or the default domain.
-This is typically used after receiving a new nonce from the authorization server.
-
-
-Parameters
-
-- nonce: string
-
The DPoP nonce value to set.
-
-Optionalid: string
-Optional identifier for the domain. If not provided, uses the default domain.
-
-Returns Observable<void>
An Observable that completes when the nonce is set.
-
-
-
+
+ Sets the DPoP nonce for the specified domain or the
+ default domain. This is typically used after receiving a
+ new nonce from the authorization server.
+
+ The DPoP nonce value to set.
+Optionalid:
+ string
+ + Optional identifier for the domain. If not + provided, uses the default domain. +
+An Observable that completes when the nonce is set.
+ +Tracks the Authentication State for the SDK
-Readonlyerror$Emits errors that occur during login, or when checking for an active session on startup.
-ReadonlyidEmits ID token claims when authenticated, or null if not authenticated.
-ReadonlyisEmits boolean values indicating the authentication state of the user. If true, it means a user has authenticated.
-This depends on the value of isLoading$, so there is no need to manually check the loading state of the SDK.
ReadonlyisEmits boolean values indicating the loading state of the SDK.
-Readonlyuser$Emits details about the authenticated user, or null if not authenticated.
-Refresh the state to ensure the isAuthenticated, user$ and idTokenClaims$
-reflect the most up-to-date values from Auth0Client.
Update the access token, doing so will also refresh the state.
-The new Access Token
-Emits the error in the error$ observable.
The new error
-Update the isLoading state using the provided value
-The new value for isLoading
-Tracks the Authentication State for the SDK
+Readonlyerror$
+ + Emits errors that occur during login, or when checking for an + active session on startup. +
+Readonlyid+ Emits ID token claims when authenticated, or null if not + authenticated. +
+Readonlyis
+ Emits boolean values indicating the authentication state of
+ the user. If true, it means a user has
+ authenticated. This depends on the value of
+ isLoading$, so there is no need to manually check
+ the loading state of the SDK.
+
Readonlyis+ Emits boolean values indicating the loading state of the SDK. +
+Readonlyuser$
+ + Emits details about the authenticated user, or null if not + authenticated. +
+
+ Refresh the state to ensure the
+ isAuthenticated, user$ and
+ idTokenClaims$ reflect the most up-to-date
+ values from Auth0Client.
+
+ Update the access token, doing so will also refresh the + state. +
+The new Access Token
+
+ Emits the error in the error$ observable.
+
The new error
+Update the isLoading state using the provided value
+The new value for isLoading
+Thrown when handling the redirect callback fails, will be one of Auth0's -Authentication API's Standard Error Responses: https://auth0.com/docs/api/authentication?javascript#standard-error-responses
-OptionalappState: anyOptionaldataOptionaloriginalOriginal stack trace with no modifications
-OptionalstackOptionalzoneStack trace where extra frames have been removed and zone names added.
-Staticfrom+ Thrown when handling the redirect callback fails, will be one of + Auth0's Authentication API's Standard Error Responses: + https://auth0.com/docs/api/authentication?javascript#standard-error-responses +
+OptionalappState:
+ any
+ Optionaldata
+ OptionaloriginalOriginal stack trace with no modifications
+Optionalstack
+ Optionalzone+ Stack trace where extra frames have been removed and zone + names added. +
+StaticfromThrown when handling the redirect callback for the connect flow fails, will be one of Auth0's -Authentication API's Standard Error Responses: https://auth0.com/docs/api/authentication?javascript#standard-error-responses
-OptionalappState: anyOptionaldataOptionaloriginalOriginal stack trace with no modifications
-OptionalstackOptionalzoneStack trace where extra frames have been removed and zone names added.
-Staticfrom+ Thrown when handling the redirect callback for the connect flow + fails, will be one of Auth0's Authentication API's Standard Error + Responses: + https://auth0.com/docs/api/authentication?javascript#standard-error-responses +
+OptionalappState:
+ any
+ Optionaldata
+ OptionaloriginalOriginal stack trace with no modifications
+Optionalstack
+ Optionalzone+ Stack trace where extra frames have been removed and zone + names added. +
+StaticfromThrown when network requests to the Auth server fail.
-The error code from the server response.
The error_description from the server response.
Optionaldata: Record<string, any>
-Any other fields from the server's error response (for example auth_session).
OptionaldataOptionaloriginalOriginal stack trace with no modifications
-OptionalstackOptionalzoneStack trace where extra frames have been removed and zone names added.
-StaticfromThrown when network requests to the Auth server fail.
+
+ The error code from the server
+ response.
+
+ The error_description from the server
+ response.
+
Optionaldata:
+ Record<string,
+ any>
+
+ Any other fields from the server's error response
+ (for example auth_session).
+
Optionaldata
+ OptionaloriginalOriginal stack trace with no modifications
+Optionalstack
+ Optionalzone+ Stack trace where extra frames have been removed and zone + names added. +
+StaticfromThrown at construction time for an invalid option combination (e.g.
-refreshTokenMode: 'online' without useDpop: true). The suggestion names the fix.
OptionaldataOptionaloriginalOriginal stack trace with no modifications
-OptionalstackOptionalzoneStack trace where extra frames have been removed and zone names added.
-Staticfrom
+ Thrown at construction time for an invalid option combination
+ (e.g. refreshTokenMode: 'online' without
+ useDpop: true). The suggestion names the
+ fix.
+
Optionaldata
+ OptionaloriginalOriginal stack trace with no modifications
+Optionalstack
+ Optionalzone+ Stack trace where extra frames have been removed and zone + names added. +
+StaticfromError thrown when initiating an MFA challenge fails.
-try {
const challenge = await mfa.challenge({
mfaToken: mfaToken,
challengeType: 'otp',
authenticatorId: 'otp|dev_123'
});
} catch (error) {
if (error instanceof MfaChallengeError) {
console.log(error.error); // 'too_many_attempts'
console.log(error.error_description); // 'Rate limit exceeded'
}
}
+
+
+
+
+
+ MfaChallengeError | @auth0/auth0-angular
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class MfaChallengeError
+
+
+
+ Error thrown when initiating an MFA challenge fails.
+
+
+
+
+ Example
+
+ try {
const challenge = await mfa.challenge({
mfaToken: mfaToken,
challengeType: 'otp',
authenticatorId: 'otp|dev_123'
});
} catch (error) {
if (error instanceof MfaChallengeError) {
console.log(error.error); // 'too_many_attempts'
console.log(error.error_description); // 'Rate limit exceeded'
}
}
-
-
-
-Hierarchy (View Summary)
-
-- MfaError
-
-- MfaChallengeError
-
-
-
-
-Constructors
-
-
-constructor
-
--
-
-
-
-
Parameters
-
-- error: string
-- error_description: string
-Returns MfaChallengeError
-
-Properties
-
-
-Optionaldata
-data?: Record<string, any>
-
-error
-error: string
-
-error_ description
-error_description: string
-
-message
-message: string
-
-name
-name: string
-
-Optionaloriginal Stack
-originalStack?: string
-Original stack trace with no modifications
-
-
-Optionalstack
-stack?: string
-
-Optionalzone Aware Stack
-zoneAwareStack?: string
-Stack trace where extra frames have been removed and zone names added.
-
-
-
-
+ Optionaldata
+ OptionaloriginalOriginal stack trace with no modifications
+Optionalstack
+ Optionalzone+ Stack trace where extra frames have been removed and zone + names added. +
+Error thrown when enrolling an MFA authenticator fails.
-try {
const enrollment = await mfa.enroll({
authenticator_types: ['otp']
});
} catch (error) {
if (error instanceof MfaEnrollmentError) {
console.log(error.error); // 'invalid_phone_number'
console.log(error.error_description); // 'Invalid phone number format'
}
}
+
+
+
+
+
+ MfaEnrollmentError | @auth0/auth0-angular
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class MfaEnrollmentError
+
+
+
+ Error thrown when enrolling an MFA authenticator fails.
+
+
-
-Hierarchy (View Summary)
-
-- MfaError
-
-- MfaEnrollmentError
-
-
-
-
-Constructors
-
-
-constructor
-
--
-
-
-
-
Parameters
-
-- error: string
-- error_description: string
-Returns MfaEnrollmentError
-
-Properties
-
-
-Optionaldata
-data?: Record<string, any>
-
-error
-error: string
-
-error_ description
-error_description: string
-
-message
-message: string
-
-name
-name: string
-
-Optionaloriginal Stack
-originalStack?: string
-Original stack trace with no modifications
-
-
-Optionalstack
-stack?: string
-
-Optionalzone Aware Stack
-zoneAwareStack?: string
-Stack trace where extra frames have been removed and zone names added.
-
-
-
-
+ Optionaldata
+ OptionaloriginalOriginal stack trace with no modifications
+Optionalstack
+ Optionalzone+ Stack trace where extra frames have been removed and zone + names added. +
+Error thrown when getting enrollment factors fails.
-try {
const factors = await mfa.getEnrollmentFactors(mfaToken);
} catch (error) {
if (error instanceof MfaEnrollmentFactorsError) {
console.log(error.error); // 'mfa_context_not_found'
console.log(error.error_description); // 'MFA context not found...'
}
}
+
+
+
+
+
+ MfaEnrollmentFactorsError | @auth0/auth0-angular
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class MfaEnrollmentFactorsError
+
+
+
+ Error thrown when getting enrollment factors fails.
+
+
-
-Hierarchy (View Summary)
-
-- MfaError
-
-- MfaEnrollmentFactorsError
-
-
-
-
-Constructors
-
-
-constructor
-
--
-new MfaEnrollmentFactorsError(
error: string,
error_description: string,
): MfaEnrollmentFactorsError
-
-
-Parameters
-
-- error: string
-- error_description: string
-Returns MfaEnrollmentFactorsError
-
-Properties
-
-
-Optionaldata
-data?: Record<string, any>
-
-error
-error: string
-
-error_ description
-error_description: string
-
-message
-message: string
-
-name
-name: string
-
-Optionaloriginal Stack
-originalStack?: string
-Original stack trace with no modifications
-
-
-Optionalstack
-stack?: string
-
-Optionalzone Aware Stack
-zoneAwareStack?: string
-Stack trace where extra frames have been removed and zone names added.
-
-
-
-
+ Optionaldata
+ OptionaloriginalOriginal stack trace with no modifications
+Optionalstack
+ Optionalzone+ Stack trace where extra frames have been removed and zone + names added. +
+Base class for MFA-related errors in auth0-spa-js. -Extends GenericError for unified error hierarchy across the SDK.
-OptionaldataOptionaloriginalOriginal stack trace with no modifications
-OptionalstackOptionalzoneStack trace where extra frames have been removed and zone names added.
-+ Base class for MFA-related errors in auth0-spa-js. Extends + GenericError for unified error hierarchy across the SDK. +
+Optionaldata
+ OptionaloriginalOriginal stack trace with no modifications
+Optionalstack
+ Optionalzone+ Stack trace where extra frames have been removed and zone + names added. +
+Error thrown when listing MFA authenticators fails.
-try {
const authenticators = await mfa.getAuthenticators();
} catch (error) {
if (error instanceof MfaListAuthenticatorsError) {
console.log(error.error); // 'access_denied'
console.log(error.error_description); // 'Unauthorized'
}
}
+
+
+
+
+
+ MfaListAuthenticatorsError | @auth0/auth0-angular
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class MfaListAuthenticatorsError
+
+
+
+ Error thrown when listing MFA authenticators fails.
+
+
-
-Hierarchy (View Summary)
-
-- MfaError
-
-- MfaListAuthenticatorsError
-
-
-
-
-Constructors
-
-
-constructor
-
--
-new MfaListAuthenticatorsError(
error: string,
error_description: string,
): MfaListAuthenticatorsError
-
-
-Parameters
-
-- error: string
-- error_description: string
-Returns MfaListAuthenticatorsError
-
-Properties
-
-
-Optionaldata
-data?: Record<string, any>
-
-error
-error: string
-
-error_ description
-error_description: string
-
-message
-message: string
-
-name
-name: string
-
-Optionaloriginal Stack
-originalStack?: string
-Original stack trace with no modifications
-
-
-Optionalstack
-stack?: string
-
-Optionalzone Aware Stack
-zoneAwareStack?: string
-Stack trace where extra frames have been removed and zone names added.
-
-
-
-
+ Optionaldata
+ OptionaloriginalOriginal stack trace with no modifications
+Optionalstack
+ Optionalzone+ Stack trace where extra frames have been removed and zone + names added. +
+Error thrown when the token exchange results in a mfa_required error
OptionaldataOptionaloriginalOriginal stack trace with no modifications
-OptionalstackOptionalzoneStack trace where extra frames have been removed and zone names added.
-Staticfrom
+ Error thrown when the token exchange results in a
+ mfa_required error
+
Optionaldata
+ OptionaloriginalOriginal stack trace with no modifications
+Optionalstack
+ Optionalzone+ Stack trace where extra frames have been removed and zone + names added. +
+StaticfromError thrown when verifying an MFA challenge fails.
-try {
const tokens = await mfa.verify({
mfaToken: mfaToken,
grant_type: 'http://auth0.com/oauth/grant-type/mfa-otp',
otp: '123456'
});
} catch (error) {
if (error instanceof MfaVerifyError) {
console.log(error.error); // 'invalid_otp' or 'context_not_found'
console.log(error.error_description); // Error details
}
}
+
+
+
+
+
+ MfaVerifyError | @auth0/auth0-angular
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class MfaVerifyError
+
+
+
+ Error thrown when verifying an MFA challenge fails.
+
+
+
+
+ Example
+
+ try {
const tokens = await mfa.verify({
mfaToken: mfaToken,
grant_type: 'http://auth0.com/oauth/grant-type/mfa-otp',
otp: '123456'
});
} catch (error) {
if (error instanceof MfaVerifyError) {
console.log(error.error); // 'invalid_otp' or 'context_not_found'
console.log(error.error_description); // Error details
}
}
-
-
-
-Hierarchy (View Summary)
-
-- MfaError
-
-- MfaVerifyError
-
-
-
-
-Constructors
-
-
-constructor
-
--
-
-
-
-
Parameters
-
-- error: string
-- error_description: string
-Returns MfaVerifyError
-
-Properties
-
-
-Optionaldata
-data?: Record<string, any>
-
-error
-error: string
-
-error_ description
-error_description: string
-
-message
-message: string
-
-name
-name: string
-
-Optionaloriginal Stack
-originalStack?: string
-Original stack trace with no modifications
-
-
-Optionalstack
-stack?: string
-
-Optionalzone Aware Stack
-zoneAwareStack?: string
-Stack trace where extra frames have been removed and zone names added.
-
-
-
-
+ Optionaldata
+ OptionaloriginalOriginal stack trace with no modifications
+Optionalstack
+ Optionalzone+ Stack trace where extra frames have been removed and zone + names added. +
+Error thrown when there is no refresh token to use
-OptionaldataOptionaloriginalOriginal stack trace with no modifications
-OptionalstackOptionalzoneStack trace where extra frames have been removed and zone names added.
-StaticfromError thrown when there is no refresh token to use
+Optionaldata
+ OptionaloriginalOriginal stack trace with no modifications
+Optionalstack
+ Optionalzone+ Stack trace where extra frames have been removed and zone + names added. +
+StaticfromError thrown when there are missing scopes after refreshing a token
-OptionaldataOptionaloriginalOriginal stack trace with no modifications
-OptionalstackOptionalzoneStack trace where extra frames have been removed and zone names added.
-Staticfrom+ Error thrown when there are missing scopes after refreshing a + token +
+Optionaldata
+ OptionaloriginalOriginal stack trace with no modifications
+Optionalstack
+ Optionalzone+ Stack trace where extra frames have been removed and zone + names added. +
+StaticfromError thrown when the MyAccount API returns a non-2xx response.
-try {
await myAccount.getAuthenticationMethods();
} catch (err) {
if (err instanceof MyAccountApiError) {
console.error(err.status, err.title, err.detail);
}
}
+
+
+
+
+
+ MyAccountApiError | @auth0/auth0-angular
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class MyAccountApiError
+
+
+
+
+ Error thrown when the MyAccount API returns a non-2xx response.
+
+
+
-
-Hierarchy
-
-- Error
-
-- MyAccountApiError
-
-
-
-
-Constructors
-
-
-constructor
-
--
-
-
-
-
Parameters
-
-- __namedParameters: ErrorResponse
-Returns MyAccountApiError
-
-Properties
-
-
-Readonlydetail
-detail: string
-Human-readable explanation specific to this occurrence
-
-
-message
-message: string
-
-name
-name: string
-
-Optionaloriginal Stack
-originalStack?: string
-Original stack trace with no modifications
-
-
-Optionalstack
-stack?: string
-
-Readonlystatus
-status: number
-HTTP status code
-
-
-Readonlytitle
-title: string
-Short human-readable summary of the error
-
-
-Readonlytype
-type: string
-RFC 7807 error type identifier
-
-
-Optional Readonlyvalidation_ errors
-validation_errors?: {
detail: string;
field?: string;
pointer?: string;
source?: string;
}[]
-Field-level validation errors, if present
-
-
-Optionalzone Aware Stack
-zoneAwareStack?: string
-Stack trace where extra frames have been removed and zone names added.
-
-
-
+ Readonlydetail
+ Human-readable explanation specific to this occurrence
+OptionaloriginalOriginal stack trace with no modifications
+Optionalstack
+ Readonlystatus
+ HTTP status code
+Readonlytitle
+ Short human-readable summary of the error
+Readonlytype
+ RFC 7807 error type identifier
+Optional
+ Readonlyvalidation_Field-level validation errors, if present
+Optionalzone+ Stack trace where extra frames have been removed and zone + names added. +
+
+ Thrown when a request to the token endpoint fails, for example
+ because the device is offline or a browser extension blocks it.
+ The request is retried before this is thrown. The
+ error is network_error, and the
+ message is kept from the underlying failure (e.g. the
+ browser's Failed to fetch). If the request times out,
+ TimeoutError is thrown instead.
+
Optionaldata
+ OptionaloriginalOriginal stack trace with no modifications
+Optionalstack
+ Optionalzone+ Stack trace where extra frames have been removed and zone + names added. +
+StaticfromError thrown when requesting a passkey login challenge fails.
-Optionalcause: PasskeyApiErrorResponseOptionalbodyRaw response body text, when available.
-OptionalcauseOptionalheadersResponse headers from the error response, when available. Native Fetch Headers.
OptionaloriginalOriginal stack trace with no modifications
-OptionalstackOptionalstatusHTTP status code from the error response, when available.
-OptionalzoneStack trace where extra frames have been removed and zone names added.
-Error thrown when requesting a passkey login challenge fails.
+Optionalcause:
+ PasskeyApiErrorResponse
+ Optionalbody
+ Raw response body text, when available.
+Optionalcause
+ Optionalheaders
+
+ Response headers from the error response, when available.
+ Native Fetch Headers.
+
OptionaloriginalOriginal stack trace with no modifications
+Optionalstack
+ OptionalstatusHTTP status code from the error response, when available.
+Optionalzone+ Stack trace where extra frames have been removed and zone + names added. +
+Optionalcause: PasskeyErrorResponseOptional ReadonlycauseReadonlycodeOptionaloriginalOriginal stack trace with no modifications
-OptionalstackOptionalzoneStack trace where extra frames have been removed and zone names added.
-Optionalcause:
+ PasskeyErrorResponse
+ Optional
+ Readonlycause
+ Readonlycode
+ OptionaloriginalOriginal stack trace with no modifications
+Optionalstack
+ Optionalzone+ Stack trace where extra frames have been removed and zone + names added. +
+Error thrown when exchanging a passkey credential for tokens fails.
-Unlike the challenge errors, this carries mfa_token / mfa_requirements on
-its cause when the server responds with mfa_required.
When identifier verification is required, isRetryable indicates whether the
-user entered a wrong OTP code. A retryable error means the caller should re-collect OTP
-codes for the identifiers in verificationRequired and retry getTokenByPasskey
-with the same credential and authSession. A non-retryable error is any other error,
-so check the error (for example with isMfaRequiredError) before starting a new flow.
Optionalcause: PasskeyGetTokenApiErrorResponseOptional ReadonlyauthThe auth session token to use when retrying. Only present when isRetryable
-is true.
OptionalbodyRaw response body text, when available.
-OptionalcauseOptionalheadersResponse headers from the error response, when available. Native Fetch Headers.
Readonlyistrue when Auth0 returned invalid_grant with an auth_session, meaning
-the session is still alive and the user can retry with corrected OTP codes.
-false for every other error, so check the error (for example with
-isMfaRequiredError) before starting a new flow.
Branch on this field — never on HTTP status code or error_description text,
-which are intentionally identical on retryable and terminal invalid_grant paths.
OptionaloriginalOriginal stack trace with no modifications
-OptionalstackOptionalstatusHTTP status code from the error response, when available.
-Optional ReadonlyverificationIdentifiers that still require a valid OTP code. Only present when isRetryable
-is true and the failure was due to a wrong OTP code.
OptionalzoneStack trace where extra frames have been removed and zone names added.
-+ Error thrown when exchanging a passkey credential for tokens + fails. +
+
+ Unlike the challenge errors, this carries mfa_token /
+ mfa_requirements on its cause when the
+ server responds with mfa_required.
+
+ When identifier verification is required,
+ isRetryable indicates whether the user entered a
+ wrong OTP code. A retryable error means the caller should
+ re-collect OTP codes for the identifiers in
+ verificationRequired and retry
+ getTokenByPasskey with the same credential and
+ authSession. A non-retryable error is any other
+ error, so check the error (for example with
+ isMfaRequiredError) before starting a new flow.
+
Optionalcause:
+ PasskeyGetTokenApiErrorResponse
+ Optional
+ Readonlyauth
+ The auth session token to use when retrying. Only present when
+ isRetryable is true.
+
Optionalbody
+ Raw response body text, when available.
+Optionalcause
+ Optionalheaders
+
+ Response headers from the error response, when available.
+ Native Fetch Headers.
+
Readonlyis
+ true when Auth0 returned
+ invalid_grant with an auth_session,
+ meaning the session is still alive and the user can retry with
+ corrected OTP codes. false for every other error,
+ so check the error (for example with
+ isMfaRequiredError) before starting a new flow.
+
+ Branch on this field — never on HTTP status code or
+ error_description text, which are intentionally
+ identical on retryable and terminal
+ invalid_grant paths.
+
OptionaloriginalOriginal stack trace with no modifications
+Optionalstack
+ OptionalstatusHTTP status code from the error response, when available.
+Optional
+ Readonlyverification
+ Identifiers that still require a valid OTP code. Only present
+ when isRetryable is true and the
+ failure was due to a wrong OTP code.
+
Optionalzone+ Stack trace where extra frames have been removed and zone + names added. +
+Error thrown when requesting a passkey register challenge fails.
-Optionalcause: PasskeyApiErrorResponseOptionalbodyRaw response body text, when available.
-OptionalcauseOptionalheadersResponse headers from the error response, when available. Native Fetch Headers.
OptionaloriginalOriginal stack trace with no modifications
-OptionalstackOptionalstatusHTTP status code from the error response, when available.
-OptionalzoneStack trace where extra frames have been removed and zone names added.
-+ Error thrown when requesting a passkey register challenge fails. +
+Optionalcause:
+ PasskeyApiErrorResponse
+ Optionalbody
+ Raw response body text, when available.
+Optionalcause
+ Optionalheaders
+
+ Response headers from the error response, when available.
+ Native Fetch Headers.
+
OptionaloriginalOriginal stack trace with no modifications
+Optionalstack
+ OptionalstatusHTTP status code from the error response, when available.
+Optionalzone+ Stack trace where extra frames have been removed and zone + names added. +
+Thrown by signup() when the server requires identifier verification before
-passkey creation. Catch this error, collect OTP codes for each identifier in
-verificationRequired, then call passkey.continueSignup(codes) to complete
-the flow. The SDK retains the auth session internally — you do not need to
-pass it yourself.
OptionaldataOptionaloriginalOriginal stack trace with no modifications
-OptionalstackReadonlyverificationOptionalzoneStack trace where extra frames have been removed and zone names added.
-Staticfrom
+ Thrown by signup() when the server requires
+ identifier verification before passkey creation. Catch this error,
+ collect OTP codes for each identifier in
+ verificationRequired, then call
+ passkey.continueSignup(codes) to complete the flow.
+ The SDK retains the auth session internally — you do not need to
+ pass it yourself.
+
Optionaldata
+ OptionaloriginalOriginal stack trace with no modifications
+Optionalstack
+ ReadonlyverificationOptionalzone+ Stack trace where extra frames have been removed and zone + names added. +
+StaticfromError thrown when the login popup is closed before auth completes.
-OptionaldataOptionaloriginalOriginal stack trace with no modifications
-OptionalstackOptionalzoneStack trace where extra frames have been removed and zone names added.
-Staticfrom+ Error thrown when the login popup is closed before auth completes. +
+Optionaldata
+ OptionaloriginalOriginal stack trace with no modifications
+Optionalstack
+ Optionalzone+ Stack trace where extra frames have been removed and zone + names added. +
+StaticfromError thrown when a popup cannot be opened (window.open returned null).
OptionaldataOptionaloriginalOriginal stack trace with no modifications
-OptionalstackOptionalzoneStack trace where extra frames have been removed and zone names added.
-Staticfrom
+ Error thrown when a popup cannot be opened (window.open
+ returned null).
+
Optionaldata
+ OptionaloriginalOriginal stack trace with no modifications
+Optionalstack
+ Optionalzone+ Stack trace where extra frames have been removed and zone + names added. +
+StaticfromError thrown when the login popup times out (if the user does not complete auth)
-OptionaldataOptionaloriginalOriginal stack trace with no modifications
-OptionalstackOptionalzoneStack trace where extra frames have been removed and zone names added.
-Staticfrom+ Error thrown when the login popup times out (if the user does not + complete auth) +
+Optionaldata
+ OptionaloriginalOriginal stack trace with no modifications
+Optionalstack
+ Optionalzone+ Stack trace where extra frames have been removed and zone + names added. +
+StaticfromError thrown when the wrong DPoP nonce is used and a potential subsequent retry wasn't able to fix it.
-OptionaldataOptionaloriginalOriginal stack trace with no modifications
-OptionalstackOptionalzoneStack trace where extra frames have been removed and zone names added.
-Staticfrom+ Error thrown when the wrong DPoP nonce is used and a potential + subsequent retry wasn't able to fix it. +
+Optionaldata
+ OptionaloriginalOriginal stack trace with no modifications
+Optionalstack
+ Optionalzone+ Stack trace where extra frames have been removed and zone + names added. +
+StaticfromConstDefines a common set of HTTP methods.
-ConstDefines a common set of HTTP methods.
+Functional AuthGuard to ensure routes can only be accessed when authenticated.
-Note: Should only be used as of Angular 15
-Contains the information about a route associated with a component loaded in an outlet at a particular moment in time.
-Represents the state of the router at a moment in time.
-An Observable, indicating if the route can be accessed or not
-+ Functional AuthGuard to ensure routes can only be accessed + when authenticated. +
+Note: Should only be used as of Angular 15
++ Contains the information about a route associated with + a component loaded in an outlet at a particular moment + in time. +
++ Represents the state of the router at a moment in + time. +
++ An Observable, indicating if the route can be accessed or not +
+ +Functional AuthHttpInterceptor to include the access token in matching requests.
-Note: Should only be used as of Angular 15
-An outgoing HTTP request with an optional typed body.
-Represents the next interceptor in an interceptor chain, or the real backend if there are no -further interceptors.
-An Observable representing the intercepted HttpRequest
-+ Functional AuthHttpInterceptor to include the access token + in matching requests. +
+Note: Should only be used as of Angular 15
++ An outgoing HTTP request with an optional typed body. +
++ Represents the next interceptor in an interceptor + chain, or the real backend if there are no further + interceptors. +
+An Observable representing the intercepted HttpRequest
+ +A custom type guard to help identify route definitions that are actually HttpInterceptorRouteConfig types.
-The route definition type
-+ A custom type guard to help identify route definitions that + are actually HttpInterceptorRouteConfig types. +
+The route definition type
+Initialize the authentication system. Configuration can either be specified here, -or by calling AuthClientConfig.set (perhaps from an APP_INITIALIZER factory function).
-Note: Should only be used as of Angular 15. This function returns EnvironmentProviders
-which ensures it can only be used at the application/environment level and cannot be
-added to a component's providers array (this will result in a compile-time error).
Optionalconfig: AuthConfig
-The optional configuration for the SDK.
-bootstrapApplication(AppComponent, {
providers: [
provideAuth0(),
],
});
+
+
+
+
+
+ provideAuth0 | @auth0/auth0-angular
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Function provideAuth0
+
+
+
+ -
+
+
+
+
+ Initialize the authentication system. Configuration can
+ either be specified here, or by calling AuthClientConfig.set
+ (perhaps from an APP_INITIALIZER factory function).
+
+
+ Note: Should only be used as of Angular 15. This function
+ returns EnvironmentProviders which ensures it
+ can only be used at the application/environment level and
+ cannot be added to a component's providers array (this will
+ result in a compile-time error).
+
+
+
+ Parameters
+
+ -
+
Optionalconfig:
+ AuthConfig
+
+ The optional configuration for the SDK.
+
+
+
+
+
+ Returns
+ EnvironmentProviders
+
+
-
-
+ Angular specific state to be stored before redirect -and any account that the user may have connected to.
-Any custom parameter to be stored in appState
-OptionalconnectedThe connected account information when the user has completed -a connect account flow.
-Optionalresponse_The response type returned from the authentication server.
-OptionaltargetTarget path the app gets routed to after -handling the callback from Auth0 (defaults to '/')
-+ Angular specific state to be stored before redirect and any + account that the user may have connected to. +
+Any custom parameter to be stored in appState
+Optionalconnected+ The connected account information when the user has completed + a connect account flow. +
+Optionalresponse_+ The response type returned from the authentication server. +
+Optionaltarget
+ + Target path the app gets routed to after handling the callback + from Auth0 (defaults to '/') +
+Configuration for the authentication service
-OptionalanonymousWhere to store the anonymous session token.
-'localStorage' (default): the session token survives page reloads. Suitable for most SPAs.'memory': the session token lives only for the current page load. Use this if you do not
-want anonymous session data written to disk.'localStorage'
+
+
+
+
+
+ AuthConfig | @auth0/auth0-angular
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Interface AuthConfig
+
+
+
+ Configuration for the authentication service
+
+
+
+ interface
+ AuthConfig
+ {
anonymousSessionsCacheMode?:
+ "localStorage"
+ |
+ "memory";
auth0Client?:
+ {
env?:
+ {
+ [key:
+ string]:
+ string
+ };
name:
+ string;
version:
+ string;
};
authorizationParams?:
+ ClientAuthorizationParams;
authorizeTimeoutInSeconds?:
+ number;
cache?:
+ ICache;
cacheLocation?:
+ CacheLocation;
clientId:
+ string;
cookieDomain?:
+ string;
createAnonymousSessionOnFailedSilentAuth?:
+ boolean;
domain:
+ string;
enterpriseConnect?:
+ boolean;
errorPath?:
+ string;
httpInterceptor?:
+ HttpInterceptorConfig;
httpTimeoutInSeconds?:
+ number;
interactiveErrorHandler?:
+ "popup";
issuer?:
+ string;
leeway?:
+ number;
legacySameSiteCookie?:
+ boolean;
nowProvider?:
+ ()
+ =>
+ number
+ |
+ Promise<number>;
refreshTokenMode?:
+ RefreshTokenMode;
sessionCheckExpiryDays?:
+ number;
sessionTransferTokenQueryParamName?:
+ string;
skipRedirectCallback?:
+ boolean;
useCookiesForTransactions?:
+ boolean;
useDpop?:
+ boolean;
useFormData?:
+ boolean;
useMrrt?:
+ boolean;
useRefreshTokens?:
+ boolean;
useRefreshTokensFallback?:
+ boolean;
workerUrl?:
+ string;
}
+
+
+ Hierarchy
+
+ -
+ Auth0ClientOptions
+
+ -
+ AuthConfig
+
+
+
+
+
+
+
+
+
+
+
+ Index
+
+
+
+
+ Properties
+
+
+ anonymous Sessions Cache Mode?
+ auth0 Client?
+ authorization Params?
+ authorize Timeout In Seconds?
+ cache?
+ cache Location?
+ client Id
+ cookie Domain?
+ create Anonymous Session On Failed Silent Auth?
+ domain
+ enterprise Connect?
+ error Path?
+ http Interceptor?
+ http Timeout In Seconds?
+ interactive Error Handler?
+ issuer?
+ leeway?
+ legacy Same Site Cookie?
+ now Provider?
+ refresh Token Mode?
+ session Check Expiry Days?
+ session Transfer Token Query Param Name?
+ skip Redirect Callback?
+ use Cookies For Transactions?
+ use Dpop?
+ use Form Data?
+ use Mrrt?
+ use Refresh Tokens?
+ use Refresh Tokens Fallback?
+ worker Url?
+
+
+
+
+
+
+
+
+
+
+ Properties
+
+
+
+
+
+ Optionalanonymous Sessions Cache Mode
+
+
+ anonymousSessionsCacheMode?:
+ "localStorage"
+ |
+ "memory"
+
+
+ Where to store the anonymous session token.
+
+ -
+
'localStorage' (default): the session token
+ survives page reloads. Suitable for most SPAs.
+
+ -
+
'memory': the session token lives only for the
+ current page load. Use this if you do not want anonymous
+ session data written to disk.
+
+
+
+
-
-Optional Internalauth0 Client
-auth0Client?: { env?: { [key: string]: string }; name: string; version: string }
-Internal property to send information about the client to the authorization server.
-
-
-Optionalauthorization Params
-authorizationParams?: ClientAuthorizationParams
-URL parameters that will be sent back to the Authorization Server. This can be known parameters
-defined by Auth0 or custom parameters that you define.
-
-
-Optionalauthorize Timeout In Seconds
-authorizeTimeoutInSeconds?: number
-A maximum number of seconds to wait before declaring background calls to /authorize as failed for timeout
-Defaults to 60s.
-
-
-Optionalcache
-
-Specify a custom cache implementation to use for token storage and retrieval. This setting takes precedence over cacheLocation if they are both specified.
-
-
-Optionalcache Location
-cacheLocation?: CacheLocation
-The 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
-
-
-client Id
-clientId: string
-The Client ID found on your Application settings page
-
-
-Optionalcookie Domain
-cookieDomain?: string
-The 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).
-
-
-Optionalcreate Anonymous Session On Failed Silent Auth
-createAnonymousSessionOnFailedSilentAuth?: boolean
-When true, checkSession() automatically creates (or restores) an anonymous
-session when the user is not authenticated. This does not affect standalone
-getTokenSilently() calls. checkSession() does not throw in this case.
-Metadata limitation: the session is created without metadata. If you need
-to attach metadata to the anonymous identity, do not use this option. Call
-auth0.anonymous.createSession({ metadata }) explicitly instead.
-
-
+
+
+
+
+ Optional
+ Internalauth0 Client
+
+
+ auth0Client?:
+ {
+ env?:
+ {
+ [key:
+ string]:
+ string
+ };
+ name:
+ string;
+ version:
+ string
+ }
+
+
+
+ Internal property to send information about the client to the
+ authorization server.
+
+
+
+
+
+
+ Optionalauthorization Params
+
+
+ authorizationParams?:
+ ClientAuthorizationParams
+
+
+
+ URL parameters that will be sent back to the Authorization
+ Server. This can be known parameters defined by Auth0 or
+ custom parameters that you define.
+
+
+
+
+
+
+ Optionalauthorize Timeout In Seconds
+
+
+ authorizeTimeoutInSeconds?:
+ number
+
+
+
+ A maximum number of seconds to wait before declaring
+ background calls to /authorize as failed for timeout Defaults
+ to 60s.
+
+
+
+
+
+
+ Optionalcache
+
+
+
+
+ Specify a custom cache implementation to use for token storage
+ and retrieval. This setting takes precedence over
+ cacheLocation if they are both specified.
+
+
+
+
+
+
+ Optionalcache Location
+
+
+ cacheLocation?:
+ CacheLocation
+
+
+
+ The 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
+
+
+
+
+
+
+ client Id
+
+
+ clientId:
+ string
+
+
+ The Client ID found on your Application settings page
+
+
+
+
+
+ Optionalcookie Domain
+
+
+ cookieDomain?:
+ string
+
+
+
+ The 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).
+
+
+
+
+
+
+ Optionalcreate Anonymous Session On Failed Silent Auth
+
+
+ createAnonymousSessionOnFailedSilentAuth?:
+ boolean
+
+
+
+ When true,
+ checkSession() automatically creates (or
+ restores) an anonymous session when the user is not
+ authenticated. This does not affect standalone
+ getTokenSilently() calls.
+ checkSession() does not throw in this case.
+
+
+ Metadata limitation: the session is created
+ without metadata. If you need to attach metadata to the
+ anonymous identity, do not use this option. Call
+ auth0.anonymous.createSession({ metadata })
+ explicitly instead.
+
+
+
-
-domain
-domain: string
-Your Auth0 account domain such as 'example.auth0.com',
-'example.eu.auth0.com' or , 'example.mycompany.com'
-(when using custom domains)
-
-
-Optionalenterprise Connect
-enterpriseConnect?: boolean
-Set to true when this client drives an Enterprise Connect login (enterprise
-SSO resolved from the email domain via isFederatedDomain and login_hint).
-Enterprise Connect issues no refresh token and resolves the organization from
-Home Realm Discovery at login. When enabled, the SDK warns at initialization if
-the configuration contradicts that: useRefreshTokens: true or offline_access
-in scope (no refresh token is issued) or a static organization (HRD resolves
-it, and a static value breaks multi-customer setups).
-This is a routing/telemetry flag only; it does not by itself change the login flow.
-Default: false
-
-
-Optionalerror Path
-errorPath?: string
-Path in your application to redirect to when the Authorization server
-returns an error. Defaults to /
-
-
-Optionalhttp Interceptor
-
-Configuration for the built-in Http Interceptor, used for
-automatically attaching access tokens.
-
-
-Optionalhttp Timeout In Seconds
-httpTimeoutInSeconds?: number
-Specify the timeout for HTTP calls using fetch. The default is 10 seconds.
-
-
-Optionalinteractive Error Handler
-interactiveErrorHandler?: "popup"
-Configures automatic handling of interactive authentication errors.
-When set, the SDK intercepts mfa_required errors from getTokenSilently()
-and handles them automatically instead of throwing to the caller.
-
-'popup': Opens Universal Login in a popup to complete MFA.
-The original authorizationParams (audience, scope) are preserved.
-On success, the token is returned. On failure, popup errors are thrown.
-
-This option only affects getTokenSilently(). Other methods are not affected.
-
-
+
+
+
+
+ domain
+
+
+ domain:
+ string
+
+
+
+ Your Auth0 account domain such as
+ 'example.auth0.com',
+ 'example.eu.auth0.com' or ,
+ 'example.mycompany.com' (when using
+ custom domains)
+
+
+
+
+
+
+ Optionalenterprise Connect
+
+
+ enterpriseConnect?:
+ boolean
+
+
+
+ Set to true when this client drives an Enterprise
+ Connect login (enterprise SSO resolved from the email domain
+ via
+ isFederatedDomain
+ and login_hint).
+
+
+ Enterprise Connect issues no refresh token and resolves the
+ organization from Home Realm Discovery at login. When enabled,
+ the SDK warns at initialization if the configuration
+ contradicts that: useRefreshTokens: true or
+ offline_access in scope (no refresh
+ token is issued) or a static organization (HRD
+ resolves it, and a static value breaks multi-customer setups).
+
+
+ This is a routing/telemetry flag only; it does not by itself
+ change the login flow.
+
+ Default: false
+
+
+
+
+
+ Optionalerror Path
+
+
+ errorPath?:
+ string
+
+
+
+ Path in your application to redirect to when the Authorization
+ server returns an error. Defaults to /
+
+
+
+
+
+
+ Optionalhttp Interceptor
+
+
+
+
+ Configuration for the built-in Http Interceptor, used for
+ automatically attaching access tokens.
+
+
+
+
+
+
+ Optionalhttp Timeout In Seconds
+
+
+ httpTimeoutInSeconds?:
+ number
+
+
+
+ Specify the timeout for HTTP calls using fetch.
+ The default is 10 seconds.
+
+
+
+
+
+
+ Optionalinteractive Error Handler
+
+
+ interactiveErrorHandler?:
+ "popup"
+
+
+
+ Configures automatic handling of interactive authentication
+ errors.
+
+
+ When set, the SDK intercepts mfa_required errors
+ from getTokenSilently() and handles them
+ automatically instead of throwing to the caller.
+
+
+ -
+
'popup': Opens Universal Login in a popup to
+ complete MFA. The original
+ authorizationParams (audience, scope) are
+ preserved. On success, the token is returned. On failure,
+ popup errors are thrown.
+
+
+
+ This option only affects getTokenSilently().
+ Other methods are not affected.
+
+
+
-
-Optionalissuer
-issuer?: string
-The issuer to be used for validation of JWTs, optionally defaults to the domain above
-
-
-Optionalleeway
-leeway?: number
-The 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.
-
-
-Optionallegacy Same Site Cookie
-legacySameSiteCookie?: boolean
-Sets 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
-Defaults to true
-
-
-Optionalnow Provider
-nowProvider?: () => number | Promise<number>
-Modify the value used as the current time during the token validation.
-Note: Using this improperly can potentially compromise the token validation.
-
-
-Optionalrefresh Token Mode
-
-Selects the refresh-token variant used when useRefreshTokens: true.
-Defaults to RefreshTokenMode.Offline.
-
-- RefreshTokenMode.Offline (default): rotating offline refresh tokens (
offline_access).
-- RefreshTokenMode.Online: non-rotating, session-bound Online Refresh Tokens (
online_access).
-
-Online mode requires useRefreshTokens: true and useDpop: true. The
-online_access and offline_access scopes are mutually exclusive.
-
-
-Optionalsession Check Expiry Days
-sessionCheckExpiryDays?: number
-Number of days until the cookie auth0.is.authenticated will expire
-Defaults to 1.
-
-
-Optionalsession Transfer Token Query Param Name
-sessionTransferTokenQueryParamName?: string
-Query parameter name to extract the session transfer token from for Native to Web SSO.
-When set, the SDK automatically extracts the token from the specified URL query
-parameter and includes it as session_transfer_token in authorization requests.
-This enables seamless single sign-on when users transition from a native mobile
-application to a web application.
-After extraction, the token is automatically removed from the URL using
-window.history.replaceState() to prevent accidental reuse on subsequent
-authentication requests.
-Default: undefined (feature disabled)
-Common values:
-
-'session_transfer_token' - Standard parameter name
-'stt' - Shortened version
-- Custom parameter name of your choice
-
-Set to undefined to disable automatic extraction if you prefer to handle
-session transfer tokens manually.
-
-
+
+
+
+
+ Optionalissuer
+
+
+ issuer?:
+ string
+
+
+
+ The issuer to be used for validation of JWTs, optionally
+ defaults to the domain above
+
+
+
+
+
+
+ Optionalleeway
+
+
+ leeway?:
+ number
+
+
+
+ The 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.
+
+
+
+
+
+
+ Optionallegacy Same Site Cookie
+
+
+ legacySameSiteCookie?:
+ boolean
+
+
+
+ Sets 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
+ Defaults to true
+
+
+
+
+
+
+ Optionalnow Provider
+
+
+ nowProvider?:
+ ()
+ =>
+ number
+ |
+ Promise<number>
+
+
+
+ Modify the value used as the current time during the token
+ validation.
+
+
+ Note: Using this improperly can potentially
+ compromise the token validation.
+
+
+
+
+
+
+ Optionalrefresh Token Mode
+
+
+
+
+ Selects the refresh-token variant used when
+ useRefreshTokens: true. Defaults to
+ RefreshTokenMode.Offline.
+
+
+ -
+ RefreshTokenMode.Offline
+ (default): rotating offline refresh tokens
+ (
offline_access).
+
+ -
+ RefreshTokenMode.Online: non-rotating, session-bound Online Refresh Tokens
+ (
online_access).
+
+
+
+ Online mode requires useRefreshTokens: true and
+ useDpop: true. The online_access and
+ offline_access scopes are mutually exclusive.
+
+
+
+
+
+
+ Optionalsession Check Expiry Days
+
+
+ sessionCheckExpiryDays?:
+ number
+
+
+
+ Number of days until the cookie
+ auth0.is.authenticated will expire Defaults to 1.
+
+
+
+
+
+
+ Optionalsession Transfer Token Query Param Name
+
+
+ sessionTransferTokenQueryParamName?:
+ string
+
+
+
+ Query parameter name to extract the session transfer token
+ from for Native to Web SSO.
+
+
+ When set, the SDK automatically extracts the token from the
+ specified URL query parameter and includes it as
+ session_transfer_token in authorization requests.
+ This enables seamless single sign-on when users transition
+ from a native mobile application to a web application.
+
+
+ After extraction, the token is automatically removed from the
+ URL using window.history.replaceState() to
+ prevent accidental reuse on subsequent authentication
+ requests.
+
+
+ Default: undefined (feature
+ disabled)
+
+ Common values:
+
+ -
+
'session_transfer_token' - Standard parameter
+ name
+
+ 'stt' - Shortened version
+ - Custom parameter name of your choice
+
+
+ Set to undefined to disable automatic extraction
+ if you prefer to handle session transfer tokens manually.
+
+
+
-
-Optionalskip Redirect Callback
-skipRedirectCallback?: boolean
-By default, if the page URL has code and state parameters, the SDK will assume they are for
-an Auth0 application and attempt to exchange the code for a token.
-In some cases the code might be for something else (e.g. another OAuth SDK). In these
-instances you can instruct the client to ignore them by setting skipRedirectCallback.
-AuthModule.forRoot({
skipRedirectCallback: window.location.pathname === '/other-callback'
})
+
+
+
+ See
+
+
+ https://auth0.com/docs/authenticate/single-sign-on/native-to-web
+
+
+
+
+
+
+
+ Optionalskip Redirect Callback
+
+
+ skipRedirectCallback?:
+ boolean
+
+
+
+ By default, if the page URL has code and state parameters, the
+ SDK will assume they are for an Auth0 application and attempt
+ to exchange the code for a token. In some cases the code might
+ be for something else (e.g. another OAuth SDK). In these
+ instances you can instruct the client to ignore them by
+ setting skipRedirectCallback.
+
+ AuthModule.forRoot({
skipRedirectCallback: window.location.pathname === '/other-callback'
})
-Note: In the above example, /other-callback is an existing route that will be called
-by any other OAuth provider with a code (or error in case when something went wrong) and state.
-
-
-Optionaluse Cookies For Transactions
-useCookiesForTransactions?: boolean
-If 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.
-
-
-
-Optionaluse Dpop
-useDpop?: boolean
-If 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.
-
-
-Optionaluse Form Data
-useFormData?: boolean
-If 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.
-
-
-Optionaluse Mrrt
-useMrrt?: boolean
-If true, the SDK will allow the refreshing of tokens using MRRT
-
-
-Optionaluse Refresh Tokens
-useRefreshTokens?: boolean
-If true, refresh tokens are used to fetch new access tokens from the Auth0 server. If false, the standard technique of using a hidden iframe and the authorization_code grant with prompt=none is used.
-The default setting is false.
-Standard technique relies on cookies. Because browsers increasingly block third-party cookies, it requires a Custom Domain to function reliably. Refresh tokens serve as a fallback for environments where third-party cookies are blocked.
-Using a Custom Domain with this set to false is the most secure and recommended approach.
-Note: Use of refresh tokens must be enabled by an administrator on your Auth0 client application.
-
-
-Optionaluse Refresh Tokens Fallback
-useRefreshTokensFallback?: boolean
-If 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).
-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.
-
-
-
-Example
let token: string;
try {
token = await auth0.getTokenSilently();
} catch (e) {
if (e.error === 'missing_refresh_token' || e.error === 'invalid_grant') {
auth0.loginWithRedirect();
}
}
+
+ Note: In the above example,
+ /other-callback is an existing route that will be
+ called by any other OAuth provider with a
+ code (or error in case when
+ something went wrong) and state.
+
+
+
+
+
+
+ Optionaluse Cookies For Transactions
+
+
+ useCookiesForTransactions?:
+ boolean
+
+
+
+ If 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.
+
+
+
+
+
+
+
+ Optionaluse Dpop
+
+
+ useDpop?:
+ boolean
+
+
+
+ If 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.
+
+
+
+
+
+ Optionaluse Form Data
+
+
+ useFormData?:
+ boolean
+
+
+
+ If 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.
+
+
+
+
+
+
+ Optionaluse Mrrt
+
+
+ useMrrt?:
+ boolean
+
+
+
+ If true, the SDK will allow the refreshing of
+ tokens using MRRT
+
+
+
+
+
+
+ Optionaluse Refresh Tokens
+
+
+ useRefreshTokens?:
+ boolean
+
+
+
+ If true, refresh tokens are used to fetch new access tokens
+ from the Auth0 server. If false, the standard technique of
+ using a hidden iframe and the
+ authorization_code grant with
+ prompt=none is used. The default setting is
+ false.
+
+
+ Standard technique relies on cookies. Because browsers
+ increasingly block third-party cookies, it requires a Custom
+ Domain to function reliably. Refresh tokens serve as a
+ fallback for environments where third-party cookies are
+ blocked. Using a Custom Domain with this set to
+ false is the most secure and recommended
+ approach.
+
+
+ Note: Use of refresh tokens must be enabled
+ by an administrator on your Auth0 client application.
+
+
+
+
+
+
+ Optionaluse Refresh Tokens Fallback
+
+
+ useRefreshTokensFallback?:
+ boolean
+
+
+
+ If 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). 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.
+
+
+
-
-Optionalworker Url
-workerUrl?: string
-If 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.
-
-
-
+ Optionalworker
+ If 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.
+
Optionallast_Optionalname
+ Email enrollment parameters
+Optionalemail
+ + Email address (optional, uses user's email if not provided) +
+The factor type for enrollment
+MFA token from mfa_required error
+OTP (Time-based One-Time Password) enrollment parameters
+Push notification enrollment parameters
+SMS enrollment parameters
+The factor type for enrollment
+MFA token from mfa_required error
+Phone number in E.164 format (required for SMS)
+Voice enrollment parameters
+The factor type for enrollment
+MFA token from mfa_required error
+Phone number in E.164 format (required for voice)
++ This API is currently in + Beta + and might change before General Availability. +
+Configuration for the HttpInterceptor
+Configuration for a single interceptor route
-OptionalallowAllow the HTTP call to be executed anonymously, when no token is available.
-When omitted (or set to false), calls that match the configuration will fail when no token is available.
-OptionalhttpThe HTTP method to match on. If specified, the HTTP method of -the outgoing request will be checked against this. If there is no match, the -Authorization header is not attached.
-The HTTP method name is case-sensitive.
-OptionaltokenThe options that are passed to the SDK when retrieving the -access token to attach to the outgoing request.
-OptionaluriThe URL to test, by supplying the URL to match.
-If test is a match for the current request path from the HTTP client, then
-an access token is attached to the request in the
-"Authorization" header.
If the test does not pass, the request proceeds without the access token attached.
-A wildcard character can be used to match only the start of the URL.
-OptionaluriA function that will be called with the HttpRequest.url value, allowing you to do -any kind of flexible matching.
-If this function returns true, then -an access token is attached to the request in the -"Authorization" header.
-If it returns false, the request proceeds without the access token attached.
-Configuration for a single interceptor route
+Optionalallow+ Allow the HTTP call to be executed anonymously, when no token + is available. +
++ When omitted (or set to false), calls that match the + configuration will fail when no token is available. +
+Optionalhttp+ The HTTP method to match on. If specified, the HTTP method of + the outgoing request will be checked against this. If there is + no match, the Authorization header is not attached. +
+The HTTP method name is case-sensitive.
+Optionaltoken+ The options that are passed to the SDK when retrieving the + access token to attach to the outgoing request. +
+Optionaluri
+
+ The URL to test, by supplying the URL to match. If
+ test is a match for the current request path from
+ the HTTP client, then an access token is attached to the
+ request in the
+ "Authorization" header.
+
+ If the test does not pass, the request proceeds without the + access token attached. +
++ A wildcard character can be used to match only the start of + the URL. +
+Optionaluri+ A function that will be called with the HttpRequest.url value, + allowing you to do any kind of flexible matching. +
++ If this function returns true, then an access token is + attached to the request in the + "Authorization" header. +
++ If it returns false, the request proceeds without the access + token attached. +
+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.
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.
-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
-OptionalreturnTo?: stringThe 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.
-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.
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);
}
});
+
+
+
+
+
+ LogoutOptions | @auth0/auth0-angular
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Interface LogoutOptions
+
+
+ interface
+ LogoutOptions
+ {
clientId?:
+ string
+ |
+ null;
logoutParams?:
+ {
federated?:
+ boolean;
returnTo?:
+ string;
[key:
+ string]:
+ any;
};
openUrl?:
+ false
|
+ ((url:
+ string)
+ =>
+ void
+ |
+ Promise<void>);
}
+
+
+ Hierarchy
+
+ -
+ Omit<SPALogoutOptions,
+ "onRedirect">
+
+ -
+ LogoutOptions
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties
+
+
+
+
+
+ Optionalclient Id
+
+
+ clientId?:
+ string
+ |
+ null
+
+
+ The 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.
+
+
+
+
+
+
+
+ Optionallogout Params
+
+
+ logoutParams?:
+ {
+ federated?:
+ boolean;
+ returnTo?:
+ string;
+ [key:
+ string]:
+ any
+ }
+
+
+
+ Parameters to pass to the logout endpoint. This can be known
+ parameters defined by Auth0 or custom parameters you wish to
+ provide.
+
+
+
+ Type Declaration
+
+ -
+
+ [key:
+ string]:
+ any
+
+
+
+ If you need to send custom parameters to the logout
+ endpoint, make sure to use the original parameter name.
+
+
+
+ -
+
+ Optionalfederated?: boolean
+
+
+
+ When 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
+
+
+
+ -
+
+ OptionalreturnTo?: string
+
+
+
+ The 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. 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.
+
+
+
+
+
+
+
+
+
+
+ Optionalopen Url
+
+
+ openUrl?:
+ false
+ | ((url:
+ string)
+ =>
+ void
+ |
+ Promise<void>)
+
+
+
+ Used 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.
+
+
+
-
-
+ Client for Auth0 MyAccount API operations.
-Provides methods for managing the current user's account:
-Verify the redirect from the connect account flow and complete the connecting of the account.
-Completion parameters including auth session, connect code, and redirect URI
-A promise that resolves to the completed connected account details
-Get a ticket for the connect account flow.
-Connection parameters including connection name and redirect URI
-A promise that resolves to a connect response with the redirect URI and auth session
-Delete an authentication method by ID.
-The ID of the authentication method to delete
-A promise that resolves when the authentication method has been deleted
-Start the enrollment of an authentication method for the current user. -The response shape varies by type.
-Enrollment challenge options specifying the factor type and any type-specific fields
-A promise that resolves to the enrollment challenge response (shape varies by type)
-Confirm the enrollment of an authentication method to complete registration.
-Enrollment verify options including the auth session and type-specific verification data
-A promise that resolves to the confirmed authentication method
-Get an authentication method by ID.
-The ID of the authentication method to retrieve
-A promise that resolves to the authentication method
-Get a list of all authentication methods for the current user.
-Optionaltype: AuthenticationMethodType
-Optional filter to return only methods of a specific type
-A promise that resolves to an array of authentication methods
-Get the status of all factors for the current user.
-A promise that resolves to an array of factors with their enabled/disabled status
-Get the current user's profile, including profile_policy with per-field edit permissions.
Optionaloptions: GetUserProfileOptions
-Optional fields to return, or set includeFields: false to exclude them instead
A promise that resolves to the user's profile
-Update details of an authentication method by ID.
-The ID of the authentication method to update
-The fields to update (e.g. name, preferred_authentication_method for phone)
-A promise that resolves to the updated authentication method
-Update the current user's profile. Only the fields you send are changed.
-The profile fields to update
-A promise that resolves to the full updated profile
-Client for Auth0 MyAccount API operations.
+Provides methods for managing the current user's account:
++ Verify the redirect from the connect account flow and + complete the connecting of the account. +
++ Completion parameters including auth session, + connect code, and redirect URI +
++ A promise that resolves to the completed connected account + details +
+ +Get a ticket for the connect account flow.
++ Connection parameters including connection name + and redirect URI +
++ A promise that resolves to a connect response with the + redirect URI and auth session +
+ +Delete an authentication method by ID.
+The ID of the authentication method to delete
++ A promise that resolves when the authentication method has + been deleted +
+ ++ Start the enrollment of an authentication method for the + current user. The response shape varies by type. +
++ Enrollment challenge options specifying the factor + type and any type-specific fields +
++ A promise that resolves to the enrollment challenge + response (shape varies by type) +
+ ++ Confirm the enrollment of an authentication method to + complete registration. +
++ Enrollment verify options including the auth + session and type-specific verification data +
++ A promise that resolves to the confirmed authentication + method +
+ +Get an authentication method by ID.
++ The ID of the authentication method to retrieve +
+A promise that resolves to the authentication method
+ ++ Get a list of all authentication methods for the current + user. +
+Optionaltype:
+ AuthenticationMethodType
+ + Optional filter to return only methods of a + specific type +
++ A promise that resolves to an array of authentication + methods +
+ +Get the status of all factors for the current user.
++ A promise that resolves to an array of factors with their + enabled/disabled status +
+ +
+ Get the current user's profile, including
+ profile_policy with per-field edit
+ permissions.
+
+ This feature is currently in + Beta. It might change before General Availability, and + Auth0 does not support beta functionality for production + use. The feature must be enabled for your tenant. +
+Optionaloptions:
+ GetUserProfileOptions
+
+ Optional fields to return, or set
+ includeFields: false to exclude them
+ instead
+
A promise that resolves to the user's profile
+ +Update details of an authentication method by ID.
+The ID of the authentication method to update
++ The fields to update (e.g. name, + preferred_authentication_method for phone) +
++ A promise that resolves to the updated authentication + method +
+ ++ Update the current user's profile. Only the fields you + send are changed. +
++ This feature is currently in + Beta. It might change before General Availability, and + Auth0 does not support beta functionality for production + use. The feature must be enabled for your tenant. +
+The profile fields to update
+A promise that resolves to the full updated profile
+ +Observable-based MFA API client exposed by AuthService.mfa.
This is the Angular counterpart of MfaApiClient from @auth0/auth0-spa-js.
-All methods return Observable instead of Promise.
Initiates an MFA challenge, sending an OOB code via SMS, email, or push, -or preparing for OTP entry. Required for all factor types except OTP, -where it is optional.
-Enrolls a new MFA authenticator (OTP, SMS, Voice, Email, or Push).
-Returns the list of enrolled MFA authenticators for the current user, -filtered by the challenge types stored in the MFA context.
-Returns the available enrollment factors from the stored MFA context. -A non-empty result means the user must enroll before they can authenticate.
-Verifies an MFA challenge and returns raw tokens. The grant type is inferred
-automatically from the provided field: otp, oobCode, or recoveryCode.
-Angular auth state (isAuthenticated$, user$) is not updated automatically —
-call getAccessTokenSilently() afterwards to reflect the new session.
+ Observable-based MFA API client exposed by
+ AuthService.mfa.
+
+ This is the Angular counterpart of MfaApiClient from
+ @auth0/auth0-spa-js. All methods return
+ Observable instead of Promise.
+
+ Initiates an MFA challenge, sending an OOB code via SMS, + email, or push, or preparing for OTP entry. Required for + all factor types except OTP, where it is optional. +
++ Enrolls a new MFA authenticator (OTP, SMS, Voice, Email, + or Push). +
++ Returns the list of enrolled MFA authenticators for the + current user, filtered by the challenge types stored in + the MFA context. +
++ Returns the available enrollment factors from the stored + MFA context. A non-empty result means the user must + enroll before they can authenticate. +
+
+ Verifies an MFA challenge and returns raw tokens. The
+ grant type is inferred automatically from the provided
+ field: otp, oobCode, or
+ recoveryCode. Angular auth state
+ (isAuthenticated$, user$) is
+ not updated automatically — call
+ getAccessTokenSilently() afterwards to
+ reflect the new session.
+
Observable-based MyAccount API client exposed by AuthService.myAccount.
This is the Angular counterpart of MyAccountApiClient from @auth0/auth0-spa-js.
-All methods return Observable instead of Promise.
Starts enrollment of an authentication method.
-Returns a challenge response containing auth_session and type-specific data.
Completes enrollment by verifying the challenge response.
-Returns the created AuthenticationMethod.
Returns a single authentication method by its ID.
-Returns the authenticated user's enrolled authentication methods, -optionally filtered by type.
-Optionaltype: AuthenticationMethodTypeReturns the list of factors with their enabled and enrollment status.
-Returns the current user's profile, including profile_policy with
-per-field edit permissions. Requires the read:me:profile scope.
Pass fields to return only those fields, or set includeFields: false
-to exclude them instead.
This feature is currently in Beta. -It might change before General Availability, and Auth0 does not support beta functionality for -production use. The feature must be enabled for your tenant.
-Optionaloptions: GetUserProfileOptionsUpdates the specified authentication method (e.g. name, preferred phone method).
-Updates the current user's profile. Only the fields you send are changed.
-Returns the full updated profile. Requires the update:me:profile scope.
-Angular auth state (user$, idTokenClaims$) is not updated automatically —
-call getAccessTokenSilently({ cacheMode: 'off' }) afterwards to get a new
-ID token with the updated profile.
This feature is currently in Beta. -It might change before General Availability, and Auth0 does not support beta functionality for -production use. The feature must be enabled for your tenant.
-
+ Observable-based MyAccount API client exposed by
+ AuthService.myAccount.
+
+ This is the Angular counterpart of
+ MyAccountApiClient from
+ @auth0/auth0-spa-js. All methods return
+ Observable instead of Promise.
+
+ Starts enrollment of an authentication method. Returns a
+ challenge response containing
+ auth_session and type-specific data.
+
+ Completes enrollment by verifying the challenge
+ response. Returns the created
+ AuthenticationMethod.
+
Returns a single authentication method by its ID.
++ Returns the authenticated user's enrolled authentication + methods, optionally filtered by type. +
+Optionaltype:
+ AuthenticationMethodType
+ + Returns the list of factors with their enabled and + enrollment status. +
+
+ Returns the current user's profile, including
+ profile_policy with per-field edit
+ permissions. Requires the
+ read:me:profile scope.
+
+ Pass fields to return only those fields, or
+ set includeFields: false to exclude them
+ instead.
+
+ This feature is currently in + Beta. It might change before General Availability, and + Auth0 does not support beta functionality for production + use. The feature must be enabled for your tenant. +
+Optionaloptions:
+ GetUserProfileOptions
+ + Updates the specified authentication method (e.g. name, + preferred phone method). +
+
+ Updates the current user's profile. Only the fields you
+ send are changed. Returns the full updated profile.
+ Requires the update:me:profile scope.
+ Angular auth state (user$,
+ idTokenClaims$) is not updated
+ automatically — call
+ getAccessTokenSilently({ cacheMode: 'off' })
+ afterwards to get a new ID token with the updated
+ profile.
+
+ This feature is currently in + Beta. It might change before General Availability, and + Auth0 does not support beta functionality for production + use. The feature must be enabled for your tenant. +
+Observable-based Passkey API client exposed by AuthService.passkey.
Wraps PasskeyApiClient from @auth0/auth0-spa-js. signup,
-continueSignup and login handle the full WebAuthn flow internally and
-update Angular auth state on success. getSignupChallenge,
-getLoginChallenge and getTokenWithPasskey are granular APIs for running
-the WebAuthn ceremony yourself.
-All methods return Observable instead of Promise.
Continues a signup that was interrupted by identifier verification.
-Call this after signup() errors with PasskeyVerificationRequiredError,
-passing an OTP code for each identifier in verificationRequired.
-Updates isAuthenticated$ and user$ on success.
If a code is wrong and the session is still active, this errors with a
-PasskeyGetTokenError where isRetryable is true. Collect new codes for
-error.verificationRequired and call continueSignup() again; the same
-passkey is reused, so the user is not prompted again.
Requests a passkey login challenge.
-Step 1 of the granular login flow. Emits the authSession and a decoded
-publicKey (PublicKeyCredentialRequestOptions). Pass publicKey to
-navigator.credentials.get(), then hand the credential and authSession
-to getTokenWithPasskey().
Does not change the auth state.
-Optionaloptions: PasskeyLoginChallengeOptionsRequests a passkey signup challenge.
-Step 1 of the granular signup flow. Emits the authSession and a decoded
-publicKey (PublicKeyCredentialCreationOptions). Pass publicKey to
-navigator.credentials.create(), then hand the credential and
-authSession to getTokenWithPasskey().
If the connection requires identifier verification, verificationRequired
-lists the identifiers to verify. Collect the OTP codes before calling
-navigator.credentials.create() and pass them as verification to
-getTokenWithPasskey().
Does not change the auth state.
-Exchanges a signed passkey credential for tokens.
-Step 2 of the granular flow. Accepts the raw PublicKeyCredential from
-either navigator.credentials.create() (signup) or
-navigator.credentials.get() (login).
-Updates isAuthenticated$ and user$ on success.
If an OTP code in verification is wrong and the session is still active,
-this errors with a PasskeyGetTokenError where isRetryable is true.
-Call getTokenWithPasskey() again with error.authSession, the same
-credential, and new codes for error.verificationRequired.
Authenticates an existing user via passkey assertion.
-Updates isAuthenticated$ and user$ on success.
Optionaloptions: PasskeyLoginOptionsRegisters a new user with a passkey credential.
-Updates isAuthenticated$ and user$ on success.
If the connection requires identifier verification, this errors with
-PasskeyVerificationRequiredError before the passkey prompt is shown.
-Collect the OTP codes and call continueSignup() to finish.
+ Observable-based Passkey API client exposed by
+ AuthService.passkey.
+
+ Wraps PasskeyApiClient from
+ @auth0/auth0-spa-js. signup,
+ continueSignup and login handle the full
+ WebAuthn flow internally and update Angular auth state on success.
+ getSignupChallenge,
+ getLoginChallenge and
+ getTokenWithPasskey are granular APIs for running the
+ WebAuthn ceremony yourself. All methods return
+ Observable instead of Promise.
+
+ Continues a signup that was interrupted by identifier
+ verification. Call this after
+ signup() errors with
+ PasskeyVerificationRequiredError, passing
+ an OTP code for each identifier in
+ verificationRequired. Updates
+ isAuthenticated$ and user$ on
+ success.
+
+ If a code is wrong and the session is still active, this
+ errors with a PasskeyGetTokenError where
+ isRetryable is true. Collect
+ new codes for
+ error.verificationRequired and call
+ continueSignup() again; the same passkey is
+ reused, so the user is not prompted again.
+
Requests a passkey login challenge.
+
+ Step 1 of the granular login flow. Emits the
+ authSession and a decoded
+ publicKey
+ (PublicKeyCredentialRequestOptions). Pass
+ publicKey to
+ navigator.credentials.get(), then hand the
+ credential and authSession to
+ getTokenWithPasskey().
+
Does not change the auth state.
+Optionaloptions:
+ PasskeyLoginChallengeOptions
+ Requests a passkey signup challenge.
+
+ Step 1 of the granular signup flow. Emits the
+ authSession and a decoded
+ publicKey
+ (PublicKeyCredentialCreationOptions). Pass
+ publicKey to
+ navigator.credentials.create(), then hand
+ the credential and authSession to
+ getTokenWithPasskey().
+
+ If the connection requires identifier verification,
+ verificationRequired
+ lists the identifiers to verify. Collect the OTP codes
+ before calling
+ navigator.credentials.create() and pass
+ them as verification to
+ getTokenWithPasskey().
+
Does not change the auth state.
+Exchanges a signed passkey credential for tokens.
+
+ Step 2 of the granular flow. Accepts the raw
+ PublicKeyCredential from either
+ navigator.credentials.create() (signup) or
+ navigator.credentials.get() (login).
+ Updates isAuthenticated$ and
+ user$ on success.
+
+ If an OTP code in verification is wrong and
+ the session is still active, this errors with a
+ PasskeyGetTokenError where
+ isRetryable is true. Call
+ getTokenWithPasskey() again with
+ error.authSession, the same
+ credential, and new codes for
+ error.verificationRequired.
+
+ Authenticates an existing user via passkey assertion.
+ Updates isAuthenticated$ and
+ user$ on success.
+
Optionaloptions:
+ PasskeyLoginOptions
+
+ Registers a new user with a passkey credential. Updates
+ isAuthenticated$ and user$ on
+ success.
+
+ If the connection requires identifier verification, this
+ errors with
+ PasskeyVerificationRequiredError before the
+ passkey prompt is shown. Collect the OTP codes and call
+ continueSignup() to finish.
+
OptionalaaguidOptionallast_Optionalrelying_OptionaltransportsOptionaluser_Optionalaaguid
+ Optionallast_Optionalrelying_Optionaltransports
+ Optionaluser_Optionallast_Optionallast_OptionalnameOptionallast_Optionalname
+ Optionallast_Optionalname
+ Optionalmanual_Optionallast_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.
-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.
-const client = new Auth0Client({
openUrl(url) {
window.location.replace(url);
}
});
+
+
+
+
+
+ RedirectLoginOptions | @auth0/auth0-angular
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Interface RedirectLoginOptions<TAppState>
+
+
+ interface
+ RedirectLoginOptions<TAppState>
+ {
appState?:
+ TAppState;
authorizationParams?:
+ AuthorizationParams;
fragment?:
+ string;
openUrl?:
+ (url:
+ string)
+ =>
+ void
+ |
+ Promise<void>;
}
+
+
+ Type Parameters
+
+ -
+ TAppState
+
+
+
+
+ Hierarchy
+
+ -
+ Omit<SPARedirectLoginOptions<TAppState>,
+ "onRedirect">
+
+ -
+ RedirectLoginOptions
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties
+
+
+
+
+
+ Optionalapp State
+
+
+
+ Used to store state before doing the redirect
+
+
+
+
+
+ Optionalauthorization Params
+
+
+
+
+ URL parameters that will be sent back to the Authorization
+ Server. This can be known parameters defined by Auth0 or
+ custom parameters that you define.
+
+
+
+
+
+
+ Optionalfragment
+
+
+ fragment?:
+ string
+
+
+ Used to add to the URL fragment before redirecting
+
+
+
+
+
+ Optionalopen Url
+
+
+ openUrl?:
+ (url:
+ string)
+ =>
+ void
+ |
+ Promise<void>
+
+
+
+ Used to control the redirect and not rely on the SDK to do the
+ actual redirect.
+
+
+
-
-
+ Optionallast_Optionalname
+ Optionalmanual_+ This API is currently in + Beta + and might change before General Availability. +
+Optionalfamily_Optionalgiven_Optionalname
+ Optionalnickname
+ Optionalpicture
+ Optionalcreated_OptionalemailOptionalemail_Optionalfamily_Optionalgiven_OptionalnameOptionalnicknameOptionalphone_Optionalphone_OptionalpictureOptionalprofile_Optionalupdated_Optionaluser_Optionalusername+ This API is currently in + Beta + and might change before General Availability. +
+Optionalcreated_Optionalemail
+ Optionalemail_Optionalfamily_Optionalgiven_Optionalname
+ Optionalnickname
+ Optionalphone_Optionalphone_Optionalpicture
+ Optionalprofile_Optionalupdated_Optionaluser_Optionalusername
+ Optionalkey_Optionallast_OptionalnameOptionalpublic_Optionalkey_Optionallast_Optionalname
+ Optionalpublic_Optionalkey_Optionallast_OptionalnameOptionalpublic_Optionalkey_Optionallast_Optionalname
+ Optionalpublic_Defines the type for a route config entry. Can either be:
-Defines the type for a route config entry. Can either be:
+The account that has been connected during the connect flow.
-The account that has been connected during the connect flow.
+ConstConstConstInjection token for accessing configuration.
-Use the Inject decorator to access the configuration from a service or component:
class MyService(@Inject(AuthConfigService) config: AuthConfig) {}
+
+
+
+
+
+ AuthConfigService | @auth0/auth0-angular
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Variable AuthConfigServiceConst
+
+
+
+ Injection token for accessing configuration.
+
+
-
-
+
Navigates to the specified url. The router will be used if one is available, otherwise it falls back -to
-window.history.replaceState.