File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
frontend/src/components/layout Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -199,6 +199,7 @@ export class UsersController {
199199
200200 @Post ( '/logout' )
201201 logout ( @Res ( { passthrough : true } ) response : Response ) {
202+ response . header ( 'logout' , 'true' ) ;
202203 response . cookie ( 'auth' , '' , {
203204 domain : getCookieUrlFromDomain ( process . env . FRONTEND_URL ! ) ,
204205 ...( ! process . env . NOT_SECURED
Original file line number Diff line number Diff line change @@ -73,11 +73,13 @@ function LayoutContextInner(params: { children: ReactNode }) {
7373 : '/analytics?onboarding=true' ;
7474 return true ;
7575 }
76+
7677 if ( response ?. headers ?. get ( 'reload' ) ) {
7778 window . location . reload ( ) ;
7879 return true ;
7980 }
80- if ( response . status === 401 ) {
81+
82+ if ( response . status === 401 || response ?. headers ?. get ( 'logout' ) ) {
8183 if ( ! isSecured ) {
8284 setCookie ( 'auth' , '' , - 10 ) ;
8385 setCookie ( 'showorg' , '' , - 10 ) ;
You can’t perform that action at this time.
0 commit comments