Browse Source

feat(vben5): Increase the localization of auth errors

- 增加登录必须更改密码本地化
pull/1219/head
colin 8 months ago
parent
commit
365f31ca3b
  1. 9
      apps/vben5/packages/@abp/account/src/hooks/useOAuthError.ts

9
apps/vben5/packages/@abp/account/src/hooks/useOAuthError.ts

@ -13,14 +13,15 @@ export function useOAuthError() {
case 'Invalid username or password!': {
return $t('abp.oauth.errors.invalidUserNameOrPassword');
}
// 需要二次认证
case 'RequiresTwoFactor': {
return $t('abp.oauth.errors.requiresTwoFactor');
}
// 需要更改密码
case 'PeriodicallyChangePassword':
case 'ShouldChangePasswordOnNextLogin': {
return $t('abp.oauth.errors.shouldChangePassword');
}
// 需要二次认证
case 'RequiresTwoFactor': {
return $t('abp.oauth.errors.requiresTwoFactor');
}
// Token已失效
case 'The token is no longer valid.': {
return $t('abp.oauth.errors.tokenHasExpired');

Loading…
Cancel
Save