Skip to content

Commit

Permalink
Merge pull request #2 from ls1intum/fix-token
Browse files Browse the repository at this point in the history
Fix token
  • Loading branch information
ninori9 authored Jan 29, 2025
2 parents d5eba3a + 6639f45 commit 2e20eef
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public ResponseEntity<Map<String, String>> login(@RequestBody LoginRequestDTO lo
.httpOnly(true)
.secure(false) // TODO: Change this when deployed
.sameSite("Lax") // For cross-site requests, None is required when sending cookies
.path("/api/users")
.path("/")
.maxAge(7 * 24 * 60 * 60) // Refresh token expiry, say one week
.build();

Expand Down Expand Up @@ -160,7 +160,7 @@ public ResponseEntity<Void> logout() {
.httpOnly(true)
.secure(true)
.sameSite("Strict")
.path("/refresh")
.path("/")
.maxAge(0) // Invalidate the cookie immediately
.build();

Expand Down

0 comments on commit 2e20eef

Please sign in to comment.