From b0b39ce71cd77fbffbf23d56b20db1927f0c6cb1 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Wed, 31 Aug 2016 09:56:31 -0400 Subject: Add debug logging when receiving an oauth redirect (#3916) --- api/oauth.go | 2 ++ i18n/en.json | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/api/oauth.go b/api/oauth.go index 7942b0e0c..ef6c0a80b 100644 --- a/api/oauth.go +++ b/api/oauth.go @@ -290,6 +290,8 @@ func completeOAuth(c *Context, w http.ResponseWriter, r *http.Request) { params := mux.Vars(r) service := params["service"] + l4g.Debug(utils.T("api.oauth.receive_redirect.debug", map[string]interface{}{"URL": r.URL.String()})) + code := r.URL.Query().Get("code") state := r.URL.Query().Get("state") diff --git a/i18n/en.json b/i18n/en.json index d8df8e835..f2a2d2cd0 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -1005,6 +1005,10 @@ "id": "api.oauth.allow_oauth.bad_client.app_error", "translation": "invalid_request: Bad client_id" }, + { + "id": "api.oauth.receive_redirect.debug", + "translation": "OAuth2 redirect: {{.URL}}" + }, { "id": "api.oauth.allow_oauth.bad_redirect.app_error", "translation": "invalid_request: Missing or bad redirect_uri" -- cgit v1.2.3-1-g7c22