File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
integration-libs/punchout/core Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ export class PunchoutService implements PunchoutFacade {
72
72
return throwError ( ( ) => new Error ( 'Punchout Session Id missing' ) ) ;
73
73
}
74
74
75
- return this . punchoutAuthService . silentLogout ( ) . pipe (
75
+ return this . punchoutAuthService . silentLogout ( payload ?. isPageRefresh ) . pipe (
76
76
switchMap ( ( ) => this . requestPunchoutSession ( payload . punchoutSessionId ) ) ,
77
77
map ( ( punchoutSession ) => {
78
78
if ( punchoutSession ?. token ?. accessToken ) {
Original file line number Diff line number Diff line change @@ -39,9 +39,13 @@ export class PunchoutAuthService {
39
39
protected punchoutDetectionService = inject ( PunchoutDetectionService ) ;
40
40
protected routingService = inject ( RoutingService ) ;
41
41
42
- silentLogout ( ) : Observable < boolean > {
42
+ silentLogout ( isPageRefresh = false ) : Observable < boolean > {
43
43
return this . isUserLoggedIn ( ) . pipe (
44
- tap ( ( ) => this . punchoutStoreService . clearPunchoutState ( ) ) ,
44
+ tap ( ( ) => {
45
+ if ( ! isPageRefresh ) {
46
+ this . punchoutStoreService . clearPunchoutState ( ) ;
47
+ }
48
+ } ) ,
45
49
switchMap ( ( isLoggedIn ) => {
46
50
return isLoggedIn
47
51
? from ( this . authService . coreLogout ( ) ) . pipe (
You can’t perform that action at this time.
0 commit comments