summaryrefslogtreecommitdiffstats
path: root/app/oauth.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/oauth.go')
-rw-r--r--app/oauth.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/oauth.go b/app/oauth.go
index 3202ac5ed..1cce5a3a0 100644
--- a/app/oauth.go
+++ b/app/oauth.go
@@ -564,7 +564,7 @@ func generateOAuthStateTokenExtra(email, action, cookie string) string {
func (a *App) GetAuthorizationCode(w http.ResponseWriter, r *http.Request, service string, props map[string]string, loginHint string) (string, *model.AppError) {
sso := a.Config().GetSSOService(service)
- if sso != nil && !sso.Enable {
+ if sso == nil || !sso.Enable {
return "", model.NewAppError("GetAuthorizationCode", "api.user.get_authorization_code.unsupported.app_error", nil, "service="+service, http.StatusNotImplemented)
}