fixed an issue with session manager interface
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user