fixed an issue with session manager interface

This commit is contained in:
2025-12-18 13:30:02 -05:00
parent fd0458cc08
commit 1c9688efd0
3 changed files with 8 additions and 33 deletions

View File

@@ -20,11 +20,7 @@ func authenticatedMiddleware(deps *deps, next http.Handler) http.Handler {
return
}
if err = deps.sessions.Put(r.Context(), StateKey, state); err != nil {
deps.log.Error("unable to store state in session", "error", err)
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
deps.sessions.Put(r.Context(), StateKey, state)
loginURL := deps.auth.AuthCodeURL(state)
http.Redirect(w, r, loginURL, http.StatusFound)