summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-08-31 09:56:31 -0400
committerenahum <nahumhbl@gmail.com>2016-08-31 10:56:31 -0300
commitb0b39ce71cd77fbffbf23d56b20db1927f0c6cb1 (patch)
tree2e86e6520c3b350f0779c89b4b07ee7ed3d080ae
parentdc09b7781ac310646014f05db23844ab2c6d63f4 (diff)
downloadchat-b0b39ce71cd77fbffbf23d56b20db1927f0c6cb1.tar.gz
chat-b0b39ce71cd77fbffbf23d56b20db1927f0c6cb1.tar.bz2
chat-b0b39ce71cd77fbffbf23d56b20db1927f0c6cb1.zip
Add debug logging when receiving an oauth redirect (#3916)
-rw-r--r--api/oauth.go2
-rw-r--r--i18n/en.json4
2 files changed, 6 insertions, 0 deletions
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
@@ -1006,6 +1006,10 @@
"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"
},