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
func (o *OAuth) SaveAccounts(w http.ResponseWriter, r *http.Request, registry *AccountRegistry) error {
64
session, err := o.SessStore.Get(r, AccountsName)
65
if err != nil {
66
+
o.Logger.Warn("failed to decode existing accounts cookie, will create new", "err", err)
67
}
68
69
data, err := json.Marshal(registry)
+1
-1
appview/oauth/oauth.go
+1
-1
appview/oauth/oauth.go
···
104
func (o *OAuth) SaveSession(w http.ResponseWriter, r *http.Request, sessData *oauth.ClientSessionData) error {
105
userSession, err := o.SessStore.Get(r, SessionName)
106
if err != nil {
107
+
o.Logger.Warn("failed to decode existing session cookie, will create new", "err", err)
108
}
109
110
userSession.Values[SessionDid] = sessData.AccountDID.String()