diff --git a/Directory.Packages.props b/Directory.Packages.props
index 92b49bd1d..60258d5f0 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -1,367 +1,367 @@
-
- 10.0.0
- 2.15.2
- 3.3.5
- 10.0.2
- 10.0.2
- 10.0.0
- 10.0.0
- 10.0.0
- 13.1.0
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ 10.0.0
+ 2.15.2
+ 3.3.5
+ 10.0.2
+ 10.0.2
+ 10.0.0
+ 10.0.0
+ 10.0.0
+ 13.1.0
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/vben5/apps/app-antd/src/locales/langs/en-US/abp.json b/apps/vben5/apps/app-antd/src/locales/langs/en-US/abp.json
index 49dced4c6..84408903b 100644
--- a/apps/vben5/apps/app-antd/src/locales/langs/en-US/abp.json
+++ b/apps/vben5/apps/app-antd/src/locales/langs/en-US/abp.json
@@ -18,7 +18,8 @@
"invalidUserNameOrPassword": "Invalid username or password!",
"tokenHasExpired": "The token is no longer valid!",
"requiresTwoFactor": "Identity verification is required. Please select a verification method!",
- "shouldChangePassword": "Your password has expired. Please change it and login!"
+ "shouldChangePassword": "Your password has expired. Please change it and login!",
+ "accessDenied": "You have refused the necessary authorization for the application. Please log in again!"
}
},
"manage": {
diff --git a/apps/vben5/apps/app-antd/src/locales/langs/zh-CN/abp.json b/apps/vben5/apps/app-antd/src/locales/langs/zh-CN/abp.json
index 16bb7ec01..bdf07a393 100644
--- a/apps/vben5/apps/app-antd/src/locales/langs/zh-CN/abp.json
+++ b/apps/vben5/apps/app-antd/src/locales/langs/zh-CN/abp.json
@@ -18,7 +18,8 @@
"invalidUserNameOrPassword": "用户名或密码错误!",
"tokenHasExpired": "您的请求会话已过期,请重新登录!",
"requiresTwoFactor": "需要验证身份,请选择一种验证方式!",
- "shouldChangePassword": "您的密码已过期,请修改密码后登录!"
+ "shouldChangePassword": "您的密码已过期,请修改密码后登录!",
+ "accessDenied": "您拒绝了应用程序必须的授权, 请重新登录!"
}
},
"manage": {
diff --git a/apps/vben5/apps/app-antd/src/router/routes/core.ts b/apps/vben5/apps/app-antd/src/router/routes/core.ts
index 959ed35c1..032207207 100644
--- a/apps/vben5/apps/app-antd/src/router/routes/core.ts
+++ b/apps/vben5/apps/app-antd/src/router/routes/core.ts
@@ -28,7 +28,7 @@ const coreRoutes: RouteRecordRaw[] = [
hideInBreadcrumb: true,
hideInMenu: true,
hideInTab: true,
- title: 'Processing login',
+ title: $t('page.auth.processingLogin'),
},
name: 'OidcFallback',
path: '/signin-callback',
diff --git a/apps/vben5/apps/app-antd/src/store/auth.ts b/apps/vben5/apps/app-antd/src/store/auth.ts
index 3b3452809..6c7240094 100644
--- a/apps/vben5/apps/app-antd/src/store/auth.ts
+++ b/apps/vben5/apps/app-antd/src/store/auth.ts
@@ -1,4 +1,4 @@
-import type { TokenResult } from '@abp/account';
+import type { OAuthError, TokenResult } from '@abp/account';
import type { Recordable, UserInfo } from '@vben/types';
@@ -45,7 +45,7 @@ export const useAuthStore = defineStore('auth', () => {
await oAuthService.login();
}
- async function oidcCallback() {
+ async function oidcCallback(onError?: (error: OAuthError) => void) {
try {
const user = await oAuthService.handleCallback();
return await _loginSuccess({
@@ -55,6 +55,8 @@ export const useAuthStore = defineStore('auth', () => {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
expiresIn: user.expires_in!,
});
+ } catch (error: any) {
+ onError && onError(error as OAuthError);
} finally {
loginLoading.value = false;
}
diff --git a/apps/vben5/apps/app-antd/src/views/_core/fallback/login-callback.vue b/apps/vben5/apps/app-antd/src/views/_core/fallback/login-callback.vue
index 9ec43d98e..5081589e1 100644
--- a/apps/vben5/apps/app-antd/src/views/_core/fallback/login-callback.vue
+++ b/apps/vben5/apps/app-antd/src/views/_core/fallback/login-callback.vue
@@ -1,12 +1,26 @@
diff --git a/apps/vben5/packages/@abp/account/src/hooks/useOAuthError.ts b/apps/vben5/packages/@abp/account/src/hooks/useOAuthError.ts
index a1e821002..64fc93d0b 100644
--- a/apps/vben5/packages/@abp/account/src/hooks/useOAuthError.ts
+++ b/apps/vben5/packages/@abp/account/src/hooks/useOAuthError.ts
@@ -1,10 +1,6 @@
-import { $t } from '@vben/locales';
+import type { OAuthError } from '../types/token';
-interface OAuthError {
- error: string;
- error_description?: string;
- error_uri?: string;
-}
+import { $t } from '@vben/locales';
export function useOAuthError() {
function formatError(error: OAuthError) {
@@ -22,6 +18,10 @@ export function useOAuthError() {
case 'RequiresTwoFactor': {
return $t('abp.oauth.errors.requiresTwoFactor');
}
+ // 用户拒绝授权
+ case 'The authorization was denied by the end user.': {
+ return $t('abp.oauth.errors.accessDenied');
+ }
// Token已失效
case 'The token is no longer valid.':
case 'The user is no longer allowed to sign in.': {
diff --git a/apps/vben5/packages/@abp/openiddict/src/components/scopes/ScopeModal.vue b/apps/vben5/packages/@abp/openiddict/src/components/scopes/ScopeModal.vue
index dc2892d42..ba4b1f08d 100644
--- a/apps/vben5/packages/@abp/openiddict/src/components/scopes/ScopeModal.vue
+++ b/apps/vben5/packages/@abp/openiddict/src/components/scopes/ScopeModal.vue
@@ -1,20 +1,17 @@