summaryrefslogtreecommitdiffstats
path: root/app/oauth.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/oauth.go')
-rw-r--r--app/oauth.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/oauth.go b/app/oauth.go
index 60ea39255..a0123c0e9 100644
--- a/app/oauth.go
+++ b/app/oauth.go
@@ -334,6 +334,7 @@ func (a *App) GetOAuthAccessTokenForCodeFlow(clientId, grantType, redirectUri, c
func (a *App) newSession(appName string, user *model.User) (*model.Session, *model.AppError) {
// set new token an session
session := &model.Session{UserId: user.Id, Roles: user.Roles, IsOAuth: true}
+ session.GenerateCSRF()
session.SetExpireInDays(*a.Config().ServiceSettings.SessionLengthSSOInDays)
session.AddProp(model.SESSION_PROP_PLATFORM, appName)
session.AddProp(model.SESSION_PROP_OS, "OAuth2")