Skip to content

Commit 71b9c90

Browse files
yoyo930021claude
andcommitted
fix: change session cookie SameSite from Strict to Lax
SameSite=Strict breaks magic link login from email clients: the browser does not send the cookie on the redirect to /admin because the navigation chain originated from a cross-site context. Lax allows top-level cross-site navigations while still blocking cross-site POST requests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 7902d01 commit 71b9c90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/routes/admin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ pub async fn auth_magic_link(
167167
.path("/admin")
168168
.http_only(true)
169169
.secure(is_https)
170-
.same_site(SameSite::Strict)
170+
.same_site(SameSite::Lax)
171171
.max_age(time::Duration::hours(24))
172172
.build();
173173

0 commit comments

Comments
 (0)