summaryrefslogtreecommitdiffstats
path: root/app/oauth.go
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2018-06-27 16:56:50 -0400
committerJoramWilander <jwawilander@gmail.com>2018-06-27 16:56:50 -0400
commit88c5e469ca869d9e8ceadb0f2b03e86005102f24 (patch)
treebbb1b4cc1312879476f222940651e4d3e763da9e /app/oauth.go
parentd7976549a0b45a42c04ac043a15677b7ca1228e9 (diff)
parent437f9f5b64ddb4e1f84e6c4e993120d074001777 (diff)
downloadchat-88c5e469ca869d9e8ceadb0f2b03e86005102f24.tar.gz
chat-88c5e469ca869d9e8ceadb0f2b03e86005102f24.tar.bz2
chat-88c5e469ca869d9e8ceadb0f2b03e86005102f24.zip
Merge branch 'master' into plugins-2
Diffstat (limited to 'app/oauth.go')
-rw-r--r--app/oauth.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/oauth.go b/app/oauth.go
index 477c0aeaf..80fe4342e 100644
--- a/app/oauth.go
+++ b/app/oauth.go
@@ -457,7 +457,13 @@ func (a *App) LoginByOAuth(service string, userData io.Reader, teamId string) (*
return nil, model.NewAppError("LoginByOAuth", "api.user.login_by_oauth.not_available.app_error",
map[string]interface{}{"Service": strings.Title(service)}, "", http.StatusNotImplemented)
} else {
- authData = provider.GetAuthDataFromJson(bytes.NewReader(buf.Bytes()))
+ authUser := provider.GetUserFromJson(bytes.NewReader(buf.Bytes()))
+
+ if authUser.AuthData != nil {
+ authData = *authUser.AuthData
+ } else {
+ authData = ""
+ }
}
if len(authData) == 0 {