diff --git a/apps/web-antd/src/api/request.ts b/apps/web-antd/src/api/request.ts
index b6375aaff..8c36097ff 100644
--- a/apps/web-antd/src/api/request.ts
+++ b/apps/web-antd/src/api/request.ts
@@ -51,6 +51,9 @@ function createRequestClient(baseURL: string, options?: RequestClientOptions) {
async function doRefreshToken() {
const accessStore = useAccessStore();
const refreshToken = accessStore.refreshToken as string;
+ if (!refreshToken) {
+ throw new Error('Refresh token is null!');
+ }
const resp = await refreshTokenApi(refreshToken);
const newToken = resp?.data?.data?.accessToken;
// add by 芋艿:这里一定要抛出 resp.data,从而触发 authenticateResponseInterceptor 中,刷新令牌失败!!!
diff --git a/apps/web-antd/src/router/routes/core.ts b/apps/web-antd/src/router/routes/core.ts
index ad8fc861d..5058a2d5b 100644
--- a/apps/web-antd/src/router/routes/core.ts
+++ b/apps/web-antd/src/router/routes/core.ts
@@ -97,6 +97,14 @@ const coreRoutes: RouteRecordRaw[] = [
title: $t('page.auth.login'),
},
},
+ {
+ name: 'SSOLogin',
+ path: 'sso-login',
+ component: () => import('#/views/_core/authentication/sso-login.vue'),
+ meta: {
+ title: $t('page.auth.login'),
+ },
+ }
],
},
];
diff --git a/apps/web-antd/src/store/auth.ts b/apps/web-antd/src/store/auth.ts
index 7f91d4639..4807dfcd8 100644
--- a/apps/web-antd/src/store/auth.ts
+++ b/apps/web-antd/src/store/auth.ts
@@ -108,7 +108,7 @@ export const useAuthStore = defineStore('auth', () => {
let authPermissionInfo: AuthPermissionInfo | null = null;
authPermissionInfo = await getAuthPermissionInfoApi();
// userStore
- userStore.setUserInfo(authPermissionInfo.user); // TODO @芋艿:这里有报错
+ userStore.setUserInfo(authPermissionInfo.user);
userStore.setUserRoles(authPermissionInfo.roles);
// accessStore
accessStore.setAccessMenus(authPermissionInfo.menus);
diff --git a/apps/web-antd/src/views/_core/authentication/social-login.vue b/apps/web-antd/src/views/_core/authentication/social-login.vue
index a13b01697..f70fcf167 100644
--- a/apps/web-antd/src/views/_core/authentication/social-login.vue
+++ b/apps/web-antd/src/views/_core/authentication/social-login.vue
@@ -16,7 +16,7 @@ import { getTenantSimpleList, getTenantByWebsite } from '#/api/core/auth';
const { tenantEnable, captchaEnable } = useAppConfig(import.meta.env, import.meta.env.PROD);
-defineOptions({ name: 'Login' });
+defineOptions({ name: 'SocialLogin' });
const authStore = useAuthStore();
const accessStore = useAccessStore();
@@ -34,6 +34,7 @@ const fetchTenantList = async () => {
if (!tenantEnable) {
return;
}
+
try {
// 获取租户列表、域名对应租户
const websiteTenantPromise = getTenantByWebsite(window.location.hostname);
diff --git a/apps/web-antd/src/views/_core/authentication/sso-login.vue b/apps/web-antd/src/views/_core/authentication/sso-login.vue
new file mode 100644
index 000000000..29b0f1c17
--- /dev/null
+++ b/apps/web-antd/src/views/_core/authentication/sso-login.vue
@@ -0,0 +1,205 @@
+
+
+
+
+
+
+ {{ `${client.name} 👋🏻` }}
+
+
+
+ 此第三方应用请求获得以下权限:
+
+
+
+
+
+
+
+
+ 同意授权
+
+
+ 拒绝
+
+
+
+
diff --git a/packages/effects/common-ui/src/ui/authentication/index.ts b/packages/effects/common-ui/src/ui/authentication/index.ts
index 71f41a889..0120531d1 100644
--- a/packages/effects/common-ui/src/ui/authentication/index.ts
+++ b/packages/effects/common-ui/src/ui/authentication/index.ts
@@ -5,4 +5,5 @@ export { default as AuthenticationLogin } from './login.vue';
export { default as AuthenticationQrCodeLogin } from './qrcode-login.vue';
export { default as AuthenticationRegister } from './register.vue';
export { default as DocLink } from './doc-link.vue';
+export { default as AuthenticationAuthTitle } from './auth-title.vue';
export type { AuthenticationProps } from './types';
diff --git a/packages/effects/common-ui/src/ui/authentication/qrcode-login.vue b/packages/effects/common-ui/src/ui/authentication/qrcode-login.vue
index aee41a8db..3813f11d8 100644
--- a/packages/effects/common-ui/src/ui/authentication/qrcode-login.vue
+++ b/packages/effects/common-ui/src/ui/authentication/qrcode-login.vue
@@ -52,7 +52,8 @@ const props = withDefaults(defineProps(), {
const router = useRouter();
-const text = ref('https://vben.vvbin.cn');
+// const text = ref('https://vben.vvbin.cn');
+const text = ref('https://t.zsxq.com/FUtQd');
const qrcode = useQRCode(text, {
errorCorrectionLevel: 'H',