@@ -2,16 +2,12 @@ import { Injectable, Inject, OnDestroy } from '@angular/core';
22
33import {
44 Auth0Client ,
5- RedirectLoginOptions ,
65 PopupLoginOptions ,
76 PopupConfigOptions ,
8- LogoutOptions ,
97 GetTokenSilentlyOptions ,
108 GetTokenWithPopupOptions ,
119 RedirectLoginResult ,
1210 GetTokenSilentlyVerboseResponse ,
13- User ,
14- IdToken ,
1511} from '@auth0/auth0-spa-js' ;
1612
1713import {
@@ -39,6 +35,7 @@ import { Auth0ClientService } from './auth.client';
3935import { AbstractNavigator } from './abstract-navigator' ;
4036import { AuthClientConfig , AppState } from './auth.config' ;
4137import { AuthState } from './auth.state' ;
38+ import { LogoutOptions , RedirectLoginOptions } from '../interfaces' ;
4239
4340@Injectable ( {
4441 providedIn : 'root' ,
@@ -176,8 +173,8 @@ export class AuthService<TAppState extends AppState = AppState>
176173 * Clears the application session and performs a redirect to `/v2/logout`, using
177174 * the parameters provided as arguments, to clear the Auth0 session.
178175 * If the `federated` option is specified it also clears the Identity Provider session.
179- * If the `localOnly ` option is specified , it only clears the application session.
180- * It is invalid to set both the `federated` and `localOnly` options to `true `,
176+ * If the `openUrl ` option is set to false , it only clears the application session.
177+ * It is invalid to set both the `federated` to true and `openUrl` to `false `,
181178 * and an error will be thrown if you do.
182179 * [Read more about how Logout works at Auth0](https://auth0.com/docs/logout).
183180 *
@@ -186,7 +183,7 @@ export class AuthService<TAppState extends AppState = AppState>
186183 logout ( options ?: LogoutOptions ) : Observable < void > {
187184 return from (
188185 this . auth0Client . logout ( options ) . then ( ( ) => {
189- if ( options ?. onRedirect ) {
186+ if ( options ?. openUrl === false || options ?. openUrl ) {
190187 this . authState . refresh ( ) ;
191188 }
192189 } )
0 commit comments