Handle GenerateJWTAndStoreInCookie error in setupHandler
A JWT signing failure was silently ignored, leaving the user on the setup page with no auth cookie and no explanation for subsequent 401s. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e6e8d255bd
commit
dcf1230414
1 changed files with 4 additions and 1 deletions
|
|
@ -23,7 +23,10 @@ func setupHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
GenerateJWTAndStoreInCookie(w, appKey)
|
if err := GenerateJWTAndStoreInCookie(w, appKey); err != nil {
|
||||||
|
http.Error(w, "Failed to create session", http.StatusInternalServerError)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
comp := templates.Setup(session)
|
comp := templates.Setup(session)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue