Merge pull request '[v9.0/forgejo] Improve 'Verify' error message, stopgap for #2809' (#5490) from bp-v9.0/forgejo-d17db93 into v9.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5490 Reviewed-by: Otto <otto@codeberg.org>
This commit is contained in:
commit
eb80c9429e
2 changed files with 3 additions and 1 deletions
|
@ -436,6 +436,8 @@ reset_password_wrong_user = You are signed in as %s, but the account recovery li
|
||||||
password_too_short = Password length cannot be less than %d characters.
|
password_too_short = Password length cannot be less than %d characters.
|
||||||
non_local_account = Non-local users cannot update their password through the Forgejo web interface.
|
non_local_account = Non-local users cannot update their password through the Forgejo web interface.
|
||||||
verify = Verify
|
verify = Verify
|
||||||
|
;As https://codeberg.org/forgejo/forgejo/issues/2809 progresses, please update this error message if possible
|
||||||
|
unauthorized_credentials = Credentials are incorrect or have expired. Retry your command or see %s for more information
|
||||||
scratch_code = Scratch code
|
scratch_code = Scratch code
|
||||||
use_scratch_code = Use a scratch code
|
use_scratch_code = Use a scratch code
|
||||||
twofa_scratch_used = You have used your scratch code. You have been redirected to the two-factor settings page so you may remove your device enrollment or generate a new scratch code.
|
twofa_scratch_used = You have used your scratch code. You have been redirected to the two-factor settings page so you may remove your device enrollment or generate a new scratch code.
|
||||||
|
|
|
@ -122,7 +122,7 @@ func webAuth(authMethod auth_service.Method) func(*context.Context) {
|
||||||
ar, err := common.AuthShared(ctx.Base, ctx.Session, authMethod)
|
ar, err := common.AuthShared(ctx.Base, ctx.Session, authMethod)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Failed to verify user: %v", err)
|
log.Error("Failed to verify user: %v", err)
|
||||||
ctx.Error(http.StatusUnauthorized, "Verify")
|
ctx.Error(http.StatusUnauthorized, ctx.Locale.TrString("auth.unauthorized_credentials", "https://codeberg.org/forgejo/forgejo/issues/2809"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
ctx.Doer = ar.Doer
|
ctx.Doer = ar.Doer
|
||||||
|
|
Loading…
Reference in a new issue