feat: point to kf auth to manage email/password#3623
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes PubPub’s legacy email/password change functionality and updates the settings UI to direct users to manage those credentials in the Knowledge Futures (KF) Account app, aligning account security management with the new OIDC/KF auth flow.
Changes:
- Removed
/api/account/passwordand/api/account/emailcontract + server implementations (and associated tests/email helper). - Added
OIDC_ACCOUNT_URLconfiguration and wired it through the Legal/Privacy Settings page. - Replaced the in-app “Account security” forms with a link to KF Account management, and removed the legacy EmailChange page/route.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| utils/api/contracts/account.ts | Removes email/password change endpoints from the account API contract. |
| server/utils/email/reset.ts | Removes the email-change email sender helper. |
| server/user/account.ts | Removes server handlers for changing password/email; keeps deletion/export endpoints. |
| server/user/tests/password.test.ts | Deletes tests that covered the removed password-change endpoint. |
| server/user/tests/email.test.ts | Deletes tests that covered the removed email-change endpoints. |
| server/routes/legal.tsx | Passes accountUrl into view data for the settings UI. |
| server/kf/oidc.server.ts | Introduces OIDC_ACCOUNT_URL env-backed constant and exports it. |
| server/kf/auth.ts | Re-exports OIDC_ACCOUNT_URL via the shim. |
| client/containers/Legal/PrivacySettings.tsx | Threads accountUrl through to AccountSecuritySettings. |
| client/containers/Legal/Legal.tsx | Adds accountUrl prop and passes it down to settings. |
| client/containers/Legal/DeleteAccount.tsx | Adjusts deletion-audit messaging markup (warning block wrapper changed). |
| client/containers/index.ts | Removes EmailChange export. |
| client/containers/EmailChange/index.ts | Deletes legacy EmailChange container entrypoint. |
| client/containers/EmailChange/EmailChange.tsx | Deletes legacy EmailChange page implementation. |
| client/containers/EmailChange/emailChange.scss | Deletes legacy EmailChange styling. |
| client/containers/App/paths.ts | Removes EmailChange route mapping from app paths. |
| client/components/AccountSecuritySettings/AccountSecuritySettings.tsx | Replaces forms with a KF Account management link/button. |
| client/components/AccountSecuritySettings/accountSecuritySettings.scss | Deletes unused styling for the removed forms. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
24
to
29
| type Props = { | ||
| integrations: Integration[]; | ||
| userNotificationPreferences?: UserNotificationPreferences; | ||
| userEmail: string; | ||
| accountUrl: string; | ||
| accountExports?: { |
Comment on lines
74
to
78
| {isLoadingAudit && <Spinner size={20} />} | ||
| {audit && audit.soleAdminCommunities.length > 0 && ( | ||
| <Callout intent="warning" style={{ marginBottom: 15 }}> | ||
| <> | ||
| <p> | ||
| You cannot delete your account because you are the only admin of{' '} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue(s) Resolved
Remove ability to change email and password etc.
Test Plan
Screenshots (if applicable)
Optional
Notes/Context/Gotchas
Supporting Docs