From bf57331f518c272b81d4b9d1ce8504a1424ba132 Mon Sep 17 00:00:00 2001 From: colin Date: Fri, 30 May 2025 13:13:56 +0800 Subject: [PATCH] feat(vben5): Add changing password when login --- .../src/views/_core/authentication/login.vue | 18 ++- .../authentication/should-change-password.vue | 120 ++++++++++++++++++ .../packages/@abp/account/src/types/token.ts | 6 + 3 files changed, 143 insertions(+), 1 deletion(-) create mode 100644 apps/vben5/apps/app-antd/src/views/_core/authentication/should-change-password.vue diff --git a/apps/vben5/apps/app-antd/src/views/_core/authentication/login.vue b/apps/vben5/apps/app-antd/src/views/_core/authentication/login.vue index d85f849bd..ea2963eef 100644 --- a/apps/vben5/apps/app-antd/src/views/_core/authentication/login.vue +++ b/apps/vben5/apps/app-antd/src/views/_core/authentication/login.vue @@ -1,5 +1,5 @@ @@ -111,5 +126,6 @@ onMounted(onInit); + diff --git a/apps/vben5/apps/app-antd/src/views/_core/authentication/should-change-password.vue b/apps/vben5/apps/app-antd/src/views/_core/authentication/should-change-password.vue new file mode 100644 index 000000000..e6c010ebf --- /dev/null +++ b/apps/vben5/apps/app-antd/src/views/_core/authentication/should-change-password.vue @@ -0,0 +1,120 @@ + + + + + diff --git a/apps/vben5/packages/@abp/account/src/types/token.ts b/apps/vben5/packages/@abp/account/src/types/token.ts index afa1fc984..b6c796980 100644 --- a/apps/vben5/packages/@abp/account/src/types/token.ts +++ b/apps/vben5/packages/@abp/account/src/types/token.ts @@ -69,6 +69,11 @@ interface TwoFactorError extends OAuthError { userId: string; } +interface ShouldChangePasswordError extends OAuthError { + changePasswordToken: string; + userId: string; +} + export type { OAuthError, OAuthTokenRefreshModel, @@ -76,6 +81,7 @@ export type { PasswordTokenRequest, PasswordTokenRequestModel, QrCodeTokenRequest, + ShouldChangePasswordError, TokenRequest, TokenResult, TwoFactorError,