From 8d1a132eda861f3e491a406233b726ff953cdffd Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Tue, 25 Apr 2017 12:38:33 -0400 Subject: Fix OAuth SSO first account creation, add mobile support, and fix refresh tokens (#6181) --- api4/oauth.go | 3 +++ api4/params.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'api4') diff --git a/api4/oauth.go b/api4/oauth.go index 3ace501e4..33c166da4 100644 --- a/api4/oauth.go +++ b/api4/oauth.go @@ -417,6 +417,9 @@ func completeOAuth(c *Context, w http.ResponseWriter, r *http.Request) { } else if action == model.OAUTH_ACTION_SSO_TO_EMAIL { redirectUrl = app.GetProtocol(r) + "://" + r.Host + "/claim?email=" + url.QueryEscape(props["email"]) + } else if action == model.OAUTH_ACTION_MOBILE { + ReturnStatusOK(w) + return } else { session, err := app.DoLogin(w, r, user, "") if err != nil { diff --git a/api4/params.go b/api4/params.go index 5febf06fb..785b2267b 100644 --- a/api4/params.go +++ b/api4/params.go @@ -105,7 +105,7 @@ func ApiParamsFromRequest(r *http.Request) *ApiParams { } if val, ok := props["service"]; ok { - params.Category = val + params.Service = val } if val, ok := props["preference_name"]; ok { -- cgit v1.2.3-1-g7c22