Investigating the InvalidAccountId error. Checking the auth configuration and implementation.
[tool: read_file — Tool use: read_file • Read file: convex/auth.config.ts]
[tool: read_file — Tool use: read_file • Read file: convex/auth.ts]
[tool: read_file — Tool use: read_file • Read file: convex/schema.ts]
[tool: read_file — Tool use: read_file • Read file: src/pages/Auth.tsx]
Checking for account creation logic and any related mutations:
[tool: codebase_search — Tool use: codebase_search • Searched codebase "How are user accounts created or stored in the database?" • 12 results]
[tool: grep — Tool use: grep • Grep for "signUp|createAccount|register" • 3 matches]
[tool: read_file — Tool use: read_file • Read file: package.json]
InvalidAccountId usually means the account doesn't exist or the ID is invalid. Checking the auth configuration and setup:
[tool: read_file — Tool use: read_file • Read file: .cursor/rules/convex_rules.mdc]
[tool: codebase_search — Tool use: codebase_search • Searched codebase "How is Convex Auth configured with Password provider and auth.config?" • 9 results]
InvalidAccountId usually means the account doesn't exist or the ID is invalid. The auth.config.ts looks misconfigured for the Password provider. Fixing the auth configuration:
[tool: read_file — Tool use: read_file • Read file: convex/auth.config.ts]
[tool: web_search — Tool use: web_search • Searched web convex-dev/auth Password provider InvalidAccountId error retrieveAccount • 1 results]
The auth.config.ts looks misconfigured for the Password provider and may be causing conflicts. Removing it since the Password provider doesn't need it:
[tool: delete_file — Tool use: delete_file]
Checking for other references to auth.config:
[tool: grep — Tool use: grep • Grep for "auth.config|authConfig" • 0 matches]
Removed the conflicting auth.config.ts. The InvalidAccountId error usually means:
- The account doesn't exist — if you're trying to sign in, use the "Sign up" flow first to create the account.
- Corrupted auth data — if the account should exist, there may be corrupted data in the auth tables.
Try this:
- Sign up first — use the "Sign up" button to create a new account, then sign in.
- If the account should exist — clear the auth tables in your Convex dashboard:
- Go to your Convex dashboard
- Delete all records from the
accounts and sessions tables (if they exist)
- Try signing up again
The Password provider handles both sign-in and sign-up based on the flow parameter in your form, so make sure you're using the correct flow for whether the account exists or not.
If the error persists after removing auth.config.ts, share details about whether you're signing in or signing up, and whether the account should already exist.