chore(auth): remove unused social account-linking bridge (#152)#160
Merged
Conversation
The unauthenticated POST /:slug/applications/non-member route emails the team on every call and was only under the generous global 200/min limiter, so a single IP could flood the inbox. Add a tight per-IP limiter (5 per 15 min) on this route only. It can't relay to arbitrary addresses (fixed recipients), so this just stops inbox flooding.
#158 shipped email magic-link admin sign-in via a social-token-direct + view-only middleware design, making the #152 wallet account-linking bridge dead code — it had zero client consumers. Removed: - /api/auth routes + auth.controller (link-wallet, session-from-social) - identity-link service + repository - auth_identity_links migration (never wired to a live consumer; if it was ever applied to a Supabase env, drop the table manually — nothing reads it) - the obsolete auth.controller test Kept (reused by #158): api/auth/supabaseUser.js and the x-supabase-token CORS header. Server tests: 284 pass (was 291; -7 for the deleted controller's tests). Client build + lint clean (no client changes).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
Removes the #152 wallet account-linking bridge as dead code. #158 landed admin email magic-link sign-in via a different design (social token sent directly to read routes + a view-only
requireProgramViewermiddleware), so the link-wallet / session-from-social path ended up with zero client consumers.Removed
POST /api/auth/link-wallet+POST /api/auth/session-from-social(routes +auth.controller)identity-linkservice + repositoryauth_identity_linksmigrationauth.controllertestKept (reused by #158)
server/api/auth/supabaseUser.js(getSupabaseUser/extractSupabaseToken) — used byrequireProgramViewerx-supabase-tokenCORS allow-listed headerNote on the table
auth_identity_linkswas never wired to a live consumer. Nothing reads it. If it was ever applied to a Supabase environment, drop the table manually — this PR only removes the migration file + code.Test plan
npm test(server) — 284 pass (was 291; −7 for the deleted controller's tests)cd client && npm run build— typecheck/build clean (no client changes)cd client && npm run lint— clean, 0 warningsnode --check server.js+ grep: no dangling references to the removed modulesDraft, not merging (per CLAUDE.md §6).