Repository navigation
fix(auth): Validate signup contact info and deprecate wallet project creation - #359
Merged
Merged
Conversation
Deprecate createProject, payUSDC and PAYMENT_AMOUNT: the backend no longer lets wallet JWTs create projects, so new accounts must go through signup / signupAndPay, which require email, firstName and lastName. Add an email format check for new signups and rewrite the AGENTS.md auth example around signup / signupAndPay. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
payUSDC now throws without sending funds, since the backend no longer creates projects for wallet-only sign-ins. Trim email before validating and stop echoing it in the error. AGENTS.md: read paymentLink from the payment_required result and restore the existing-wallet key recovery steps. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Add normalizeContactField, which trims strings and treats non-strings or whitespace-only values as missing. Use it in signup and upgradePlan, and test that trimmed values reach checkout. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Move EMAIL_PATTERN and the contact checks into a shared requireContactInfo helper. signup always uses it for new accounts; upgradePlan uses it whenever any of email/firstName/lastName is passed, so partial or whitespace-only names and malformed emails fail with the same errors instead of being dropped or sent as-is. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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
walletSignup→payUSDC(1 USDC to treasury) →createProjectpayUSDCnow throws without sending funds, since the backend no longer creates projects for wallet-only sign-ins.createProject,payUSDCandPAYMENT_AMOUNTare@deprecatedand will be removed in the next major.requireContactInfohelper (insignupHelpers.ts, withEMAIL_PATTERN) trimsemail/firstName/lastName, treats non-strings or whitespace-only values as missing, and checks the email format.signupuses it only when creating a new account; wallets that already have a project are unaffected.upgradePlanuses it whenever any contact field is passed (partial info fails likesignup); with none passed, the backend still auto-fetches from the existing customer.paymentLinkfrom thepayment_requiredresult, and thewalletSignup→listProjects→getProject/createApiKeysteps are documented as the way to recover an existing wallet's key.Related: helius-labs/core-ai#191, helius-labs/website#692, helius-labs/docs#1112
Release note: publish this before deploying monorepo#20801.
Verification
pnpm typecheck,pnpm format:check, eslint on changed files: cleanjest src/auth/tests/{signup,upgradePlan,payUSDC,createProject}.test.ts: passpnpm check-bundle: pass🤖 Generated with Claude Code