feat(auth): support the "Forgot Password" function#6616
feat(auth): support the "Forgot Password" function#6616zhangzhonghe merged 45 commits intodevelopfrom
Conversation
…rd link generation
…ons with ACL permissions
…r and improve token validation
…gnInForm to use it
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new "Forgot Password" feature to the auth plugin. Key changes include:
- Addition of new server endpoints for lost password, reset password, and token validation
- Comprehensive tests for lost and reset password flows
- New client pages and UI integrations for both "Forgot Password" and "Reset Password" functionalities
Reviewed Changes
Copilot reviewed 17 out of 24 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/plugins/@nocobase/plugin-auth/src/server/actions/auth.ts | Implements new endpoints for lostPassword, resetPassword, and checkResetToken |
| packages/plugins/@nocobase/plugin-auth/src/server/tests/* | Adds tests covering the new password reset flows |
| packages/plugins/@nocobase/plugin-auth/src/client/pages/* | Adds new pages for Forgot Password and Reset Password UI |
| packages/plugins/@nocobase/plugin-auth/src/client/* | Updates routing and SignIn UI to integrate with the new features |
| packages/core/sdk/src/APIClient.ts | Adds client methods to invoke the new auth endpoints |
| packages/core/client/src/schema-component/antd/password/Password.tsx | Enhances Password input with a "Forgot password?" button |
Files not reviewed (7)
- packages/plugins/@nocobase/plugin-auth/src/locale/de-DE.json: Language not supported
- packages/plugins/@nocobase/plugin-auth/src/locale/en-US.json: Language not supported
- packages/plugins/@nocobase/plugin-auth/src/locale/it-IT.json: Language not supported
- packages/plugins/@nocobase/plugin-auth/src/locale/ja-JP.json: Language not supported
- packages/plugins/@nocobase/plugin-auth/src/locale/ko-KR.json: Language not supported
- packages/plugins/@nocobase/plugin-auth/src/locale/nl-NL.json: Language not supported
- packages/plugins/@nocobase/plugin-auth/src/locale/zh-CN.json: Language not supported
Comments suppressed due to low confidence (2)
packages/plugins/@nocobase/plugin-auth/src/client/basic/SignInForm.tsx:113
- The variable 'options' is used in the getPasswordForm call but is not defined; consider replacing it with the appropriate reference (e.g., authenticator.options).
return <SchemaComponent schema={getPasswordForm({ showForgotPassword: options?.enableResetPassword })} scope={{ useBasicSignIn, allowSignUp, signUpLink, t }} />;
packages/plugins/@nocobase/plugin-auth/src/client/pages/ResetPasswordPage.tsx:86
- The useEffect hook has an empty dependency array while using 'resetToken'; consider including 'resetToken' in the dependency array to ensure the effect updates if the URL changes.
useEffect(() => { api.auth.checkResetToken({ resetToken }).then(() => { setExpired(false); }).catch((error) => { setExpired(true); }); }, []);
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…y in multiple languages
… in multiple languages
This comment has been minimized.
This comment has been minimized.
…set email content in multiple languages
This comment has been minimized.
This comment has been minimized.
…tead of email channel
This comment has been minimized.
This comment has been minimized.
…ration text in multiple languages
…etails in multiple languages
… add system settings to reset password email
…te related components
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Tests results for "E2E"25 failed 84 flaky1091 passed, 48 skipped Full HTML report. Merge workflow run. |
This is a ...
Showcase
Changelog
Docs
Checklists