Skip to content

Commit

Permalink
logout besser
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Gorzala committed Dec 28, 2023
1 parent 266b3c1 commit 81d9c5e
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,11 @@ public ResponseCookie generateCookie(String token) {
* By setting the maxAge to 0, the cookie will be deleted by the browser.
*/
public ResponseCookie generateClearingCookie() {
return ResponseCookie.from("jwt-token", "")
.build();
return ResponseCookie
.from("jwt-token", "")
.path("/")
.maxAge(0)
.build();
}

public User getUser(UUID userId) {
Expand Down

0 comments on commit 81d9c5e

Please sign in to comment.