diff --git a/lib/build/recipe/totp/index.d.ts b/lib/build/recipe/totp/index.d.ts index 35eeb08b..71cfb9ba 100644 --- a/lib/build/recipe/totp/index.d.ts +++ b/lib/build/recipe/totp/index.d.ts @@ -53,8 +53,8 @@ export default class RecipeWrapper { } | { status: "INVALID_TOTP_ERROR"; - failedTOTPAttemptCount: number; - maximumTOTPAttemptCount: number; + currentNumberOfFailedAttempts: number; + maxNumberOfFailedAttempts: number; fetchResponse: Response; } | { @@ -89,8 +89,8 @@ export default class RecipeWrapper { } | { status: "INVALID_TOTP_ERROR"; - failedTOTPAttemptCount: number; - maximumTOTPAttemptCount: number; + currentNumberOfFailedAttempts: number; + maxNumberOfFailedAttempts: number; fetchResponse: Response; } | { diff --git a/lib/build/recipe/totp/types.d.ts b/lib/build/recipe/totp/types.d.ts index c308aacf..54998a64 100644 --- a/lib/build/recipe/totp/types.d.ts +++ b/lib/build/recipe/totp/types.d.ts @@ -62,8 +62,8 @@ export declare type RecipeInterface = { } | { status: "INVALID_TOTP_ERROR"; - failedTOTPAttemptCount: number; - maximumTOTPAttemptCount: number; + currentNumberOfFailedAttempts: number; + maxNumberOfFailedAttempts: number; fetchResponse: Response; } | { @@ -85,8 +85,8 @@ export declare type RecipeInterface = { } | { status: "INVALID_TOTP_ERROR"; - failedTOTPAttemptCount: number; - maximumTOTPAttemptCount: number; + currentNumberOfFailedAttempts: number; + maxNumberOfFailedAttempts: number; fetchResponse: Response; } | { diff --git a/lib/ts/recipe/totp/index.ts b/lib/ts/recipe/totp/index.ts index 9626a297..2707c8f6 100644 --- a/lib/ts/recipe/totp/index.ts +++ b/lib/ts/recipe/totp/index.ts @@ -74,8 +74,8 @@ export default class RecipeWrapper { | { status: "OK"; fetchResponse: Response } | { status: "INVALID_TOTP_ERROR"; - failedTOTPAttemptCount: number; - maximumTOTPAttemptCount: number; + currentNumberOfFailedAttempts: number; + maxNumberOfFailedAttempts: number; fetchResponse: Response; } | { status: "LIMIT_REACHED_ERROR"; retryAfterMs: number; fetchResponse: Response } @@ -108,8 +108,8 @@ export default class RecipeWrapper { | { status: "OK"; wasAlreadyVerified: boolean; fetchResponse: Response } | { status: "INVALID_TOTP_ERROR"; - failedTOTPAttemptCount: number; - maximumTOTPAttemptCount: number; + currentNumberOfFailedAttempts: number; + maxNumberOfFailedAttempts: number; fetchResponse: Response; } | { status: "UNKNOWN_DEVICE_ERROR"; fetchResponse: Response } diff --git a/lib/ts/recipe/totp/recipeImplementation.ts b/lib/ts/recipe/totp/recipeImplementation.ts index 29d777a9..3ddd4c2c 100644 --- a/lib/ts/recipe/totp/recipeImplementation.ts +++ b/lib/ts/recipe/totp/recipeImplementation.ts @@ -64,7 +64,11 @@ export default function getRecipeImplementation( verifyCode: async function ({ totp, options, userContext }) { const { jsonBody, fetchResponse } = await querier.post< | { status: "OK" } - | { status: "INVALID_TOTP_ERROR"; failedTOTPAttemptCount: number; maximumTOTPAttemptCount: number } + | { + status: "INVALID_TOTP_ERROR"; + currentNumberOfFailedAttempts: number; + maxNumberOfFailedAttempts: number; + } | { status: "LIMIT_REACHED_ERROR"; retryAfterMs: number } >( undefined, @@ -96,7 +100,11 @@ export default function getRecipeImplementation( const { jsonBody, fetchResponse } = await querier.post< | { status: "OK"; wasAlreadyVerified: boolean } | { status: "UNKNOWN_DEVICE_ERROR" } - | { status: "INVALID_TOTP_ERROR"; failedTOTPAttemptCount: number; maximumTOTPAttemptCount: number } + | { + status: "INVALID_TOTP_ERROR"; + currentNumberOfFailedAttempts: number; + maxNumberOfFailedAttempts: number; + } | { status: "LIMIT_REACHED_ERROR"; retryAfterMs: number } >( undefined, diff --git a/lib/ts/recipe/totp/types.ts b/lib/ts/recipe/totp/types.ts index 0c2c48ee..3663b134 100644 --- a/lib/ts/recipe/totp/types.ts +++ b/lib/ts/recipe/totp/types.ts @@ -82,8 +82,8 @@ export type RecipeInterface = { | { status: "OK"; fetchResponse: Response } | { status: "INVALID_TOTP_ERROR"; - failedTOTPAttemptCount: number; - maximumTOTPAttemptCount: number; + currentNumberOfFailedAttempts: number; + maxNumberOfFailedAttempts: number; fetchResponse: Response; } | { status: "LIMIT_REACHED_ERROR"; retryAfterMs: number; fetchResponse: Response } @@ -97,8 +97,8 @@ export type RecipeInterface = { | { status: "OK"; wasAlreadyVerified: boolean; fetchResponse: Response } | { status: "INVALID_TOTP_ERROR"; - failedTOTPAttemptCount: number; - maximumTOTPAttemptCount: number; + currentNumberOfFailedAttempts: number; + maxNumberOfFailedAttempts: number; fetchResponse: Response; } | { status: "UNKNOWN_DEVICE_ERROR"; fetchResponse: Response }