Skip to content

Commit 2e20eef

Browse files
authored
Merge pull request #2 from ls1intum/fix-token
Fix token
2 parents d5eba3a + 6639f45 commit 2e20eef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/ase/angelos_kb_backend/controller/UserController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public ResponseEntity<Map<String, String>> login(@RequestBody LoginRequestDTO lo
118118
.httpOnly(true)
119119
.secure(false) // TODO: Change this when deployed
120120
.sameSite("Lax") // For cross-site requests, None is required when sending cookies
121-
.path("/api/users")
121+
.path("/")
122122
.maxAge(7 * 24 * 60 * 60) // Refresh token expiry, say one week
123123
.build();
124124

@@ -160,7 +160,7 @@ public ResponseEntity<Void> logout() {
160160
.httpOnly(true)
161161
.secure(true)
162162
.sameSite("Strict")
163-
.path("/refresh")
163+
.path("/")
164164
.maxAge(0) // Invalidate the cookie immediately
165165
.build();
166166

0 commit comments

Comments
 (0)