You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have enabled CAPTCHA in the Auth0 Admin Settings, and it functions correctly for the login flow. However, when using the signup method from [email protected] with CAPTCHA, there is a discrepancy in the TypeScript definitions for DbSignUpOptions. The captcha field is not recognized, leading to TypeScript errors.
Issue Details
The current [email protected] TypeScript typings for the signup method are as follows:
Adding the captcha field and bypassing the TypeScript error allows the signup to succeed.
Expected Behavior
The DbSignUpOptions TypeScript definition should include the captcha field to align with the API's requirements.
Reproduction
Enable CAPTCHA in the Auth0 Admin Settings.
Attempt to sign up a user with the signup method from [email protected] using the following code:
webAuth.signup({connection: databaseConnection,
email,
password,
username,captcha: captcha?.getValue(),// Error: 'captcha' does not exist in type 'DbSignUpOptions'},(error,result)=>{if(error)returnhandleCallbackFromAuth0(error,result);console.log("ok");});
Observe the TypeScript error:
TS Error: 'captcha' does not exist in type 'DbSignUpOptions'
Checklist
Description
We have enabled CAPTCHA in the Auth0 Admin Settings, and it functions correctly for the login flow. However, when using the signup method from [email protected] with CAPTCHA, there is a discrepancy in the TypeScript definitions for DbSignUpOptions. The captcha field is not recognized, leading to TypeScript errors.
Issue Details
The current
[email protected]
TypeScript typings for the signup method are as follows:The DbSignUpOptions type does not include a captcha field, but the API requires it when CAPTCHA is enabled.
Observed Behavior
Without the captcha field, the following error is returned from the API:
Adding the captcha field and bypassing the TypeScript error allows the signup to succeed.
Expected Behavior
The DbSignUpOptions TypeScript definition should include the captcha field to align with the API's requirements.
Reproduction
Observe the TypeScript error:
When bypassing the TypeScript check with @ts-expect-error:
The signup process works correctly, confirming that the API expects a captcha field.
Additional context
No response
auth0-js version
9.28.0
Which browsers have you tested in?
Chrome
The text was updated successfully, but these errors were encountered: