Expose error/status callbacks on the prebuilt <SignIn /> component (e.g. incorrect password, rate limiting)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- react, typescript
- Domain
- authentication, frontend
Research direction
Start at the prebuilt entry point in @clerk/clerk-react and trace how its internal form submission handles failures. Review how ClerkAPIError[] and codes such as form_password_incorrect and too_many_requests are represented, then determine the callback behavior and coverage needed for failed sign-in attempts.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem?
The prebuilt <SignIn /> component (@clerk/clerk-react) handles the full sign-in flow internally but doesn't expose any way to observe failures — incorrect password, rate limiting (429s), locked accounts, etc. There's no onError prop, no emitted event, and no documented way to read the failure reason from useSignIn() when the failure happened inside the component's own internal form submission (not one we drive ourselves).
As a workaround, we've had to monkey-patch window.fetch to sniff HTTP status codes for requests to our Clerk FAPI domain, just to detect a 429 and show a "too many attempts, retry in Ns" banner:
window.fetch = async (...args) => {
const response = await originalFetch(...args);
if (url.includes(CLERK_DOMAIN) && response.status === 429) {
// surface a rate-limit banner
}
return response;
};
This is fragile (breaks on any internal FAPI change), duplicated per-app, and can't distinguish error reasons (wrong password vs. locked vs. rate-limited) — only status codes.
Describe the solution you'd like
An onError (or onStatusChange) prop on <SignIn /> that fires with Clerk's structured error info (e.g. ClerkAPIError[] with codes like form_password_incorrect, too_many_requests) whenever an internal sign-in attempt fails — without requiring us to reimplement the form via the headless useSignIn() hook just to get error visibility.
Describe alternatives you've considered
- Rebuilding the whole sign-in form with
useSignIn()to get error access — loses all the built-in UI/appearance theming<SignIn />gives us for free. - Patching
window.fetch— fragile, non-public API surface, no error-code granularity.
Happy to contribute a PR if maintainers can point at the right place to emit this.
- Dominant language
- TypeScript
- Stars
- 1.8k
- Forks
- 472
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 184
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from clerk/javascript
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
clerk/javascript#9611 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
clerk/javascript#9573 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 64/100
clerk/javascript#9775 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
clerk/javascript#9667 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
clerk/javascript#9659 · 1 comment ·
All issues in clerk/javascript
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·