User friendly error messages during OAUTH and SAML flows (#16795)
* Renders error messages in webapp * Added unit test Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
9aaf29ffb4
Коммит
01e83f64da
@@ -286,12 +286,8 @@ func completeOAuth(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
renderError := func(err *model.AppError) {
|
||||
if isMobile {
|
||||
if hasRedirectURL {
|
||||
utils.RenderMobileError(c.App.Config(), w, err, redirectURL)
|
||||
} else {
|
||||
w.Write([]byte(err.ToJson()))
|
||||
}
|
||||
if isMobile && hasRedirectURL {
|
||||
utils.RenderMobileError(c.App.Config(), w, err, redirectURL)
|
||||
} else {
|
||||
utils.RenderWebAppError(c.App.Config(), w, r, err, c.App.AsymmetricSigningKey())
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user