aboutsummaryrefslogtreecommitdiffstats
path: root/routers/user/oauth.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/user/oauth.go')
-rw-r--r--routers/user/oauth.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/routers/user/oauth.go b/routers/user/oauth.go
index d4dcb857fa..a9e089b39f 100644
--- a/routers/user/oauth.go
+++ b/routers/user/oauth.go
@@ -229,6 +229,11 @@ func AuthorizeOAuth(ctx *context.Context, form auth.AuthorizationForm) {
}, form.RedirectURI)
return
}
+ // Here we're just going to try to release the session early
+ if err := ctx.Session.Release(); err != nil {
+ // we'll tolerate errors here as they *should* get saved elsewhere
+ log.Error("Unable to save changes to the session: %v", err)
+ }
case "":
break
default:
@@ -287,6 +292,11 @@ func AuthorizeOAuth(ctx *context.Context, form auth.AuthorizationForm) {
log.Error(err.Error())
return
}
+ // Here we're just going to try to release the session early
+ if err := ctx.Session.Release(); err != nil {
+ // we'll tolerate errors here as they *should* get saved elsewhere
+ log.Error("Unable to save changes to the session: %v", err)
+ }
ctx.HTML(200, tplGrantAccess)
}