ClerkAPIError drops meta.lockout_expires_in_seconds from user_locked errors
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- authentication
Línea de trabajo
Comienza en packages/shared/src/errors/clerkApiError.ts, en el análisis de metadatos alrededor de las líneas 21-38, donde ClerkAPIError construye meta a partir de claves conocidas. Sigue cómo la respuesta user_locked sin procesar se convierte en el error público y verifica después que lockout_expires_in_seconds se conserve como lockoutExpiresInSeconds y siga estando disponible para los consumidores.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Preliminary Checks
- I have reviewed the documentation: https://clerk.com/docs
- I have searched for existing issues: https://github.com/clerk/javascript/issues
- I have not already reached out to Clerk support via email or Discord
- This issue is not a question, general help request, or anything other than a bug report directly related to Clerk
Reproduction
The bug is visible in the source, no project needed: https://github.com/clerk/javascript/blob/main/packages/shared/src/errors/clerkApiError.ts#L21-L38
Publishable key
Not needed: the behavior does not depend on an instance, it is in the error parser.
Description
When an account reaches the user lockout threshold, the Frontend API answers the failed attempt with 403 user_locked and includes how long the lockout lasts in meta.lockout_expires_in_seconds. ClerkAPIError builds its meta from a fixed list of known keys (param_name, session_id, identifiers, zxcvbn, plan, …), so lockout_expires_in_seconds is dropped and the app cannot tell the user when they can try again.
Steps to reproduce:
- Enable user lockout on an instance (e.g. 10 attempts, 60 minutes).
- Sign in with a phone code and submit wrong codes until the attempt returns
user_locked. - Inspect the network response:
errors[0].meta.lockout_expires_in_secondsis present (e.g.3599). - Inspect the thrown
ClerkAPIResponseError:errors[0].metahas no lockout field.
Expected behavior:
ClerkAPIError.meta exposes the lockout duration (e.g. lockoutExpiresInSeconds), the same way ClerkAPIResponseError.retryAfter already exposes Retry-After for too_many_requests, so apps can show a countdown or hide "resend code" until the lockout ends.
Actual behavior:
The value is discarded during parsing. The only way to read it is to bypass the SDK and parse the raw response.
Environment
@clerk/shared 4.31.0 (also on main as of 2026-10-01)
@clerk/clerk-expo, React Native (Expo SDK), iOS and Android
- Lenguaje dominante
- TypeScript
- Estrellas
- 1.8k
- Forks
- 477
- Merge medio
- 2 d 3 h
- PR fusionados (30 d)
- 269
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de clerk/javascript
-
[expo] useLocalCredentials throws "Invalid key provided to SecureStore" during render when the publishable key has base64 padding (=)Posiblemente ocupada @RaphaelFakhri la tomó hace 2 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
clerk/javascript#10033 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
clerk/javascript#9987 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
clerk/javascript#10011 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 50/100
clerk/javascript#9984 ·
Los mantenedores suelen responder en 1 día
-
M2M Token only authentication in Clerk MiddlewarePosiblemente ocupada @wobsoriano la tomó hace 4 días. Abiertoneeds-triage
clerk/javascript#9981 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de clerk/javascript
Issues similares
-
skills.mdx: ReadResourceDirectoryRequest does not type-check against the 2026-07-28 base schemaAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
modelcontextprotocol/ext-skills#156 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
MystenLabs/MemWal#1104 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Effect-TS/effect#8728 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
account-pool bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
lidge-jun/opencodex#6571 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Add: CanalPlusSport8SK.skAbiertocheck:passed streams:add
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día