File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -428,14 +428,18 @@ const authSetup = function () {
428428 logger ( "inside auth0 block" , "ok" ) ;
429429 auth0 . isAuthenticated ( ) . then ( function ( isAuthenticated ) {
430430 logger ( "inside auth0 block isAuthenticated" , isAuthenticated ) ;
431- auth0 . getTokenSilently ( ) . then ( function ( token ) {
432- logger ( "inside auth0 block getTokenSilently" , token ) ;
433- storeToken ( ) ;
434- informIt ( success , e ) ;
435- } ) . catch ( function ( err ) {
436- logger ( "receiveMessage: Error in refreshing through ifram token: " , err )
431+ if ( isAuthenticated ) {
432+ auth0 . getTokenSilently ( ) . then ( function ( token ) {
433+ logger ( "inside auth0 block getTokenSilently" , token ) ;
434+ storeToken ( ) ;
435+ informIt ( success , e ) ;
436+ } ) . catch ( function ( err ) {
437+ logger ( "receiveMessage: Error in refreshing through ifram token: " , err )
438+ informIt ( failed , e ) ;
439+ } ) ;
440+ } else {
437441 informIt ( failed , e ) ;
438- } ) ;
442+ }
439443 } ) . catch ( function ( err ) {
440444 logger ( "receiveMessage: Error occured in checkng authentication" , err ) ;
441445 informIt ( failed , e ) ;
You can’t perform that action at this time.
0 commit comments