1+ import type { ClerkError } from '../errors/clerkError' ;
12import type { SetActiveNavigate } from './clerk' ;
23import type { PhoneCodeChannel } from './phoneCodeChannel' ;
34import type { SignInFirstFactor , SignInSecondFactor , SignInStatus , UserData } from './signInCommon' ;
@@ -340,12 +341,12 @@ export interface SignInFutureResource {
340341 * > Once the sign-in process is complete, call the `signIn.finalize()` method to set the newly created session as
341342 * > the active session.
342343 */
343- create : ( params : SignInFutureCreateParams ) => Promise < { error : unknown } > ;
344+ create : ( params : SignInFutureCreateParams ) => Promise < { error : ClerkError | null } > ;
344345
345346 /**
346347 * Used to submit a password to sign-in.
347348 */
348- password : ( params : SignInFuturePasswordParams ) => Promise < { error : unknown } > ;
349+ password : ( params : SignInFuturePasswordParams ) => Promise < { error : ClerkError | null } > ;
349350
350351 /**
351352 *
@@ -354,12 +355,12 @@ export interface SignInFutureResource {
354355 /**
355356 * Used to send an email code to sign-in
356357 */
357- sendCode : ( params : SignInFutureEmailCodeSendParams ) => Promise < { error : unknown } > ;
358+ sendCode : ( params : SignInFutureEmailCodeSendParams ) => Promise < { error : ClerkError | null } > ;
358359
359360 /**
360361 * Used to verify a code sent via email to sign-in
361362 */
362- verifyCode : ( params : SignInFutureEmailCodeVerifyParams ) => Promise < { error : unknown } > ;
363+ verifyCode : ( params : SignInFutureEmailCodeVerifyParams ) => Promise < { error : ClerkError | null } > ;
363364 } ;
364365
365366 /**
@@ -369,12 +370,12 @@ export interface SignInFutureResource {
369370 /**
370371 * Used to send an email link to sign-in
371372 */
372- sendLink : ( params : SignInFutureEmailLinkSendParams ) => Promise < { error : unknown } > ;
373+ sendLink : ( params : SignInFutureEmailLinkSendParams ) => Promise < { error : ClerkError | null } > ;
373374
374375 /**
375376 * Will wait for verification to complete or expire
376377 */
377- waitForVerification : ( ) => Promise < { error : unknown } > ;
378+ waitForVerification : ( ) => Promise < { error : ClerkError | null } > ;
378379
379380 /**
380381 * The verification status
@@ -404,12 +405,12 @@ export interface SignInFutureResource {
404405 /**
405406 * Used to send a phone code to sign-in
406407 */
407- sendCode : ( params : SignInFuturePhoneCodeSendParams ) => Promise < { error : unknown } > ;
408+ sendCode : ( params : SignInFuturePhoneCodeSendParams ) => Promise < { error : ClerkError | null } > ;
408409
409410 /**
410411 * Used to verify a code sent via phone to sign-in
411412 */
412- verifyCode : ( params : SignInFuturePhoneCodeVerifyParams ) => Promise < { error : unknown } > ;
413+ verifyCode : ( params : SignInFuturePhoneCodeVerifyParams ) => Promise < { error : ClerkError | null } > ;
413414 } ;
414415
415416 /**
@@ -419,23 +420,23 @@ export interface SignInFutureResource {
419420 /**
420421 * Used to send a password reset code to the first email address on the account
421422 */
422- sendCode : ( ) => Promise < { error : unknown } > ;
423+ sendCode : ( ) => Promise < { error : ClerkError | null } > ;
423424
424425 /**
425426 * Used to verify a password reset code sent via email. Will cause `signIn.status` to become `'needs_new_password'`.
426427 */
427- verifyCode : ( params : SignInFutureEmailCodeVerifyParams ) => Promise < { error : unknown } > ;
428+ verifyCode : ( params : SignInFutureEmailCodeVerifyParams ) => Promise < { error : ClerkError | null } > ;
428429
429430 /**
430431 * Used to submit a new password, and move the `signIn.status` to `'complete'`.
431432 */
432- submitPassword : ( params : SignInFutureResetPasswordSubmitParams ) => Promise < { error : unknown } > ;
433+ submitPassword : ( params : SignInFutureResetPasswordSubmitParams ) => Promise < { error : ClerkError | null } > ;
433434 } ;
434435
435436 /**
436437 * Used to perform OAuth authentication.
437438 */
438- sso : ( params : SignInFutureSSOParams ) => Promise < { error : unknown } > ;
439+ sso : ( params : SignInFutureSSOParams ) => Promise < { error : ClerkError | null } > ;
439440
440441 /**
441442 *
@@ -444,45 +445,45 @@ export interface SignInFutureResource {
444445 /**
445446 * Used to send a phone code as a second factor to sign-in
446447 */
447- sendPhoneCode : ( ) => Promise < { error : unknown } > ;
448+ sendPhoneCode : ( ) => Promise < { error : ClerkError | null } > ;
448449
449450 /**
450451 * Used to verify a phone code sent as a second factor to sign-in
451452 */
452- verifyPhoneCode : ( params : SignInFutureMFAPhoneCodeVerifyParams ) => Promise < { error : unknown } > ;
453+ verifyPhoneCode : ( params : SignInFutureMFAPhoneCodeVerifyParams ) => Promise < { error : ClerkError | null } > ;
453454
454455 /**
455456 * Used to verify a TOTP code as a second factor to sign-in
456457 */
457- verifyTOTP : ( params : SignInFutureTOTPVerifyParams ) => Promise < { error : unknown } > ;
458+ verifyTOTP : ( params : SignInFutureTOTPVerifyParams ) => Promise < { error : ClerkError | null } > ;
458459
459460 /**
460461 * Used to verify a backup code as a second factor to sign-in
461462 */
462- verifyBackupCode : ( params : SignInFutureBackupCodeVerifyParams ) => Promise < { error : unknown } > ;
463+ verifyBackupCode : ( params : SignInFutureBackupCodeVerifyParams ) => Promise < { error : ClerkError | null } > ;
463464 } ;
464465
465466 /**
466467 * Used to perform a ticket-based sign-in.
467468 */
468- ticket : ( params ?: SignInFutureTicketParams ) => Promise < { error : unknown } > ;
469+ ticket : ( params ?: SignInFutureTicketParams ) => Promise < { error : ClerkError | null } > ;
469470
470471 /**
471472 * Used to perform a Web3-based sign-in.
472473 */
473- web3 : ( params : SignInFutureWeb3Params ) => Promise < { error : unknown } > ;
474+ web3 : ( params : SignInFutureWeb3Params ) => Promise < { error : ClerkError | null } > ;
474475
475476 /**
476477 * Initiates a passkey-based authentication flow, enabling users to authenticate using a previously
477478 * registered passkey. When called without parameters, this method requires a prior call to
478479 * `SignIn.create({ strategy: 'passkey' })` to initialize the sign-in context. This pattern is particularly useful in
479480 * scenarios where the authentication strategy needs to be determined dynamically at runtime.
480481 */
481- passkey : ( params ?: SignInFuturePasskeyParams ) => Promise < { error : unknown } > ;
482+ passkey : ( params ?: SignInFuturePasskeyParams ) => Promise < { error : ClerkError | null } > ;
482483
483484 /**
484485 * Used to convert a sign-in with `status === 'complete'` into an active session. Will cause anything observing the
485486 * session state (such as the `useUser()` hook) to update automatically.
486487 */
487- finalize : ( params ?: SignInFutureFinalizeParams ) => Promise < { error : unknown } > ;
488+ finalize : ( params ?: SignInFutureFinalizeParams ) => Promise < { error : ClerkError | null } > ;
488489}
0 commit comments