File tree Expand file tree Collapse file tree
03-Calling-an-API/src/Auth
04-Authorization/src/Auth
05-Token-Renewal/src/Auth Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,6 +84,10 @@ export default class Auth {
8484 // Remove isLoggedIn flag from localStorage
8585 localStorage . removeItem ( 'isLoggedIn' ) ;
8686
87+ this . auth0 . logout ( {
88+ return_to : window . location . origin
89+ } ) ;
90+
8791 // navigate to the home route
8892 history . replace ( '/home' ) ;
8993 }
Original file line number Diff line number Diff line change @@ -98,6 +98,10 @@ export default class Auth {
9898 // Remove isLoggedIn flag from localStorage
9999 localStorage . removeItem ( 'isLoggedIn' ) ;
100100
101+ this . auth0 . logout ( {
102+ return_to : window . location . origin
103+ } ) ;
104+
101105 // navigate to the home route
102106 history . replace ( '/home' ) ;
103107 }
Original file line number Diff line number Diff line change @@ -99,6 +99,10 @@ export default class Auth {
9999 // Remove isLoggedIn flag from localStorage
100100 localStorage . removeItem ( 'isLoggedIn' ) ;
101101
102+ this . auth0 . logout ( {
103+ return_to : window . location . origin
104+ } ) ;
105+
102106 // navigate to the home route
103107 history . replace ( '/home' ) ;
104108 }
Original file line number Diff line number Diff line change @@ -108,6 +108,10 @@ export default class Auth {
108108 // Remove isLoggedIn flag from localStorage
109109 localStorage . removeItem ( 'isLoggedIn' ) ;
110110
111+ this . auth0 . logout ( {
112+ return_to : window . location . origin
113+ } ) ;
114+
111115 // navigate to the home route
112116 history . replace ( '/home' ) ;
113117 }
Original file line number Diff line number Diff line change @@ -107,6 +107,10 @@ export default class Auth {
107107 // Remove isLoggedIn flag from localStorage
108108 localStorage . removeItem ( 'isLoggedIn' ) ;
109109
110+ this . auth0 . logout ( {
111+ return_to : window . location . origin
112+ } ) ;
113+
110114 // navigate to the home route
111115 history . replace ( '/home' ) ;
112116 }
You can’t perform that action at this time.
0 commit comments