fix: Add error handling to session store

This commit is contained in:
Danny Bessems 2024-03-10 22:48:34 +11:00
parent 98ea369664
commit 1af505196a
1 changed files with 6 additions and 1 deletions

View File

@ -52,7 +52,12 @@ func callbackHandler(w http.ResponseWriter, r *http.Request) {
}
// Store the token in the session
session, _ := sessionStore.Get(r, "spamasaurusRex")
session, err := sessionStore.Get(r, "spamasaurusRex")
if err != nil {
log.Println(spew.Sdump(err))
return
}
session.Values["token"] = token
session.Save(r, w)