Two places in which we error out early instead of just warning and creating cookie anyway.
+1
-1
appview/oauth/accounts.go
+1
-1
appview/oauth/accounts.go
···
63
63
func (o *OAuth) SaveAccounts(w http.ResponseWriter, r *http.Request, registry *AccountRegistry) error {
64
64
session, err := o.SessStore.Get(r, AccountsName)
65
65
if err != nil {
66
-
return err
66
+
o.Logger.Warn("failed to decode existing accounts cookie, will create new", "err", err)
67
67
}
68
68
69
69
data, err := json.Marshal(registry)
+1
-1
appview/oauth/oauth.go
+1
-1
appview/oauth/oauth.go
···
104
104
func (o *OAuth) SaveSession(w http.ResponseWriter, r *http.Request, sessData *oauth.ClientSessionData) error {
105
105
userSession, err := o.SessStore.Get(r, SessionName)
106
106
if err != nil {
107
-
return err
107
+
o.Logger.Warn("failed to decode existing session cookie, will create new", "err", err)
108
108
}
109
109
110
110
userSession.Values[SessionDid] = sessData.AccountDID.String()