diff --git a/i18n/en.json b/i18n/en.json index c07fd93045..584cf7d5dd 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -2008,6 +2008,10 @@ "id": "api.oauth.authorize_oauth.disabled.app_error", "translation": "The system admin has turned off OAuth2 Service Provider." }, + { + "id": "api.oauth.click_redirect", + "translation": "If you are not redirected automatically, please click the link" + }, { "id": "api.oauth.close_browser", "translation": "You can close this browser tab now." diff --git a/utils/api.go b/utils/api.go index 43caf1a52e..c5d1d9b36a 100644 --- a/utils/api.go +++ b/utils/api.go @@ -78,20 +78,22 @@ func RenderWebError(config *model.Config, w http.ResponseWriter, r *http.Request } func RenderMobileAuthComplete(w http.ResponseWriter, redirectURL string) { + var link = template.HTMLEscapeString(redirectURL) RenderMobileMessage(w, ` -
- -
+ + + +

`+i18n.T("api.oauth.auth_complete")+`

`+i18n.T("api.oauth.redirecting_back")+`

- +

`+i18n.T("api.oauth.click_redirect", model.StringInterface{"Link": link})+`

+ @@ -100,9 +102,10 @@ func RenderMobileAuthComplete(w http.ResponseWriter, redirectURL string) { func RenderMobileError(config *model.Config, w http.ResponseWriter, err *model.AppError, redirectURL string) { RenderMobileMessage(w, ` -
- -
+ + + +

`+i18n.T("error")+`

`+err.Message+`

@@ -119,9 +122,31 @@ func RenderMobileMessage(w http.ResponseWriter, message string) { - -