Skip to content

Commit 8c91467

Browse files
committed
fixed setting session cookie
1 parent 49f2a05 commit 8c91467

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/src/app/auth.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class AuthService {
2424
const session = localStorage.getItem('session')
2525
if (session) {
2626
this.session = JSON.parse(session)
27-
this.cookieService.set('kk_session_token', this.session.token)
27+
this.cookieService.set('kk_session_token', this.session.token, {path: '/', expires: 1000})
2828
} else {
2929
this.session = null
3030
}
@@ -42,7 +42,7 @@ export class AuthService {
4242
saveLocalSession() {
4343
this.currentSessionSubject.next(this.session)
4444
localStorage.setItem('session', JSON.stringify(this.session))
45-
this.cookieService.set('kk_session_token', this.session.token)
45+
this.cookieService.set('kk_session_token', this.session.token, {path: '/', expires: 1000})
4646
}
4747

4848
login(user, password, returnUrl) {

0 commit comments

Comments
 (0)