summaryrefslogtreecommitdiffstats
path: root/app/oauth.go
diff options
context:
space:
mode:
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 {