Self-service account management, public profiles, Google-only OAuth - #53
Merged
Conversation
Extends the already-shipped PATCH/DELETE /api/v1/users/:id API with username and email editing, current-password verification before a password change, OAuth accounts setting an initial password, and cascade-deleting a user's posts/comments/likes on account deletion. Deletion requires re-entering the password (or, for OAuth-only accounts, typing the username) as confirmation. Adds the client side that never existed for this API: /account (self, editable) and /users/:id (anyone, read-only), reached by making every username byline in the app clickable.
Password fields (login, signup, account update/delete) were plain text inputs showing the value in the clear, and AutoForm rendered labels as raw camelCase schema keys (e.g. "currentPassword"). Adds a shared PasswordInput with a show/hide toggle used everywhere a password is entered, and humanizes AutoForm's field labels.
ChatRoom.test.tsx's render wrapper was typed as typeof rtlRender, whose generic overloads don't survive a plain arrow-function assignment. Typed it explicitly against ReactElement/RenderOptions instead. The cascade-delete test's postService.create calls were missing tags, required by CreatePost's inferred (post-default) type even though the schema defaults it at parse time.
Facebook was scaffolded but never wired up in production (Facebook's HTTPS redirect requirement made it poor value for a demo), and the team has decided not to build it out. Strips the passport-facebook strategy, the facebookId model field, provider-config plumbing (env vars, compose, .env.example), and every code/doc/test reference, while keeping Google OAuth and its account-linking security behavior unchanged. package-lock.json regenerated via npm install after dropping passport-facebook / @types/passport-facebook.
Self-service account management and public profiles
Remove Facebook OAuth, keep Google-only
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.
Summary
Included PRs
Test plan