55 GenericError ,
66 GetTokenSilentlyVerboseResponse ,
77 RedirectLoginOptions ,
8+ ResponseType ,
89 TimeoutError
910} from '@auth0/auth0-spa-js' ;
1011import { CookieService } from 'ngx-cookie-service' ;
@@ -211,11 +212,13 @@ describe('AuthService', () => {
211212 [ XF_ROLE_CLAIM ] : undefined ,
212213 [ XF_USER_ID_CLAIM ] : TestEnvironment . userId
213214 } ) ,
214- expires_in : 720
215+ expires_in : 720 ,
216+ token_type : 'Bearer'
215217 } ,
216218 idToken :
{ __raw :
'1' , sub :
'7890' , email :
'[email protected] ' } , 217219 loginResult : {
218- appState : JSON . stringify ( { returnUrl : '' } )
220+ appState : JSON . stringify ( { returnUrl : '' } ) ,
221+ response_type : ResponseType . Code
219222 }
220223 }
221224 } ) ;
@@ -236,11 +239,13 @@ describe('AuthService', () => {
236239 [ XF_ROLE_CLAIM ] : SystemRole . SystemAdmin ,
237240 [ XF_USER_ID_CLAIM ] : TestEnvironment . userId
238241 } ) ,
239- expires_in : 720
242+ expires_in : 720 ,
243+ token_type : 'Bearer'
240244 } ,
241245 idToken :
{ __raw :
'1' , sub :
'7890' , email :
'[email protected] ' } , 242246 loginResult : {
243- appState : JSON . stringify ( { returnUrl : '' } )
247+ appState : JSON . stringify ( { returnUrl : '' } ) ,
248+ response_type : ResponseType . Code
244249 }
245250 }
246251 } ) ;
@@ -261,11 +266,13 @@ describe('AuthService', () => {
261266 [ XF_ROLE_CLAIM ] : [ SystemRole . SystemAdmin , SystemRole . User ] ,
262267 [ XF_USER_ID_CLAIM ] : TestEnvironment . userId
263268 } ) ,
264- expires_in : 720
269+ expires_in : 720 ,
270+ token_type : 'Bearer'
265271 } ,
266272 idToken :
{ __raw :
'1' , sub :
'7890' , email :
'[email protected] ' } , 267273 loginResult : {
268- appState : JSON . stringify ( { returnUrl : '' } )
274+ appState : JSON . stringify ( { returnUrl : '' } ) ,
275+ response_type : ResponseType . Code
269276 }
270277 }
271278 } ) ;
@@ -810,8 +817,8 @@ class TestEnvironment {
810817 static userId = 'user01' ;
811818 auth0Response : AuthDetails | undefined = {
812819 idToken : undefined ,
813- loginResult : { appState : JSON . stringify ( { } ) } ,
814- token : { id_token : '' , access_token : '' , expires_in : 0 }
820+ loginResult : { appState : JSON . stringify ( { } ) , response_type : ResponseType . Code } ,
821+ token : { id_token : '' , access_token : '' , expires_in : 0 , token_type : 'Bearer' }
815822 } ;
816823 readonly service : AuthService ;
817824 readonly language = 'fr' ;
@@ -950,7 +957,8 @@ class TestEnvironment {
950957 [ XF_ROLE_CLAIM ] : SystemRole . SystemAdmin ,
951958 [ XF_USER_ID_CLAIM ] : TestEnvironment . userId
952959 } ) ,
953- expires_in : this . tokenExpiryTimer
960+ expires_in : this . tokenExpiryTimer ,
961+ token_type : 'Bearer'
954962 } ;
955963 }
956964
@@ -990,7 +998,8 @@ class TestEnvironment {
990998 token : this . validToken ,
991999 idToken :
{ __raw :
'1' , sub :
'7890' , email :
'[email protected] ' } , 9921000 loginResult : {
993- appState : this . _authLoginState
1001+ appState : this . _authLoginState ,
1002+ response_type : ResponseType . Code
9941003 }
9951004 } ;
9961005 this . auth0Response = auth0Response ;
0 commit comments