File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed
packages/app/src/app/store Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -278,6 +278,10 @@ export function removeJwtFromStorage({ jwt }) {
278278 jwt . reset ( ) ;
279279}
280280
281+ export function setSignedInCookie ( ) {
282+ document . cookie = 'signedIn=true; Path=/;' ;
283+ }
284+
281285export function listenToConnectionChange ( { connection } ) {
282286 connection . addListener ( 'connectionChanged' ) ;
283287}
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ export function withLoadApp(continueSequence) {
103103 {
104104 success : [
105105 set ( state `user` , props `user` ) ,
106+ actions . setSignedInCookie ,
106107 actions . setPatronPrice ,
107108 ] ,
108109 error : [
Original file line number Diff line number Diff line change @@ -8,9 +8,12 @@ export default Provider({
88 ) ;
99 } ,
1010 set ( jwt ) {
11+ document . cookie = `signedIn=true; Path=/;` ;
12+
1113 return store . set ( 'jwt' , jwt ) ;
1214 } ,
1315 reset ( ) {
16+ document . cookie = `signedIn=; Path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT;` ;
1417 document . cookie = `jwt=; Path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT;` ;
1518
1619 return store . set ( 'jwt' , null ) ;
You can’t perform that action at this time.
0 commit comments