Skip to content

Commit

Permalink
fix: update naming to match node PR
Browse files Browse the repository at this point in the history
  • Loading branch information
porcellus committed Nov 15, 2023
1 parent eeb37fb commit 25eecd8
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 18 deletions.
8 changes: 4 additions & 4 deletions lib/build/recipe/totp/index.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions lib/build/recipe/totp/types.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions lib/ts/recipe/totp/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down Expand Up @@ -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 }
Expand Down
12 changes: 10 additions & 2 deletions lib/ts/recipe/totp/recipeImplementation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions lib/ts/recipe/totp/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand All @@ -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 }
Expand Down

0 comments on commit 25eecd8

Please sign in to comment.