Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/app/core/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,12 @@ export class AuthService {

// Set the cookie expire date
const expires = new Date(expireDate);
const options: Cookies.CookieAttributes = { expires: expires };
// Use Secure on HTTPS; Lax allows external-auth redirects via top-level GET navigation.
const options: Cookies.CookieAttributes = {
expires: expires,
secure: this._window.nativeWindow.location?.protocol === 'https:',
sameSite: 'lax',
};

// Save cookie with the token
return this.storage.set(TOKENITEM, token, options);
Expand Down
Loading