Skip to content

Commit

Permalink
updated initial recipe implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
niftyvictor committed Oct 29, 2024
1 parent 57e210d commit ea42bd1
Show file tree
Hide file tree
Showing 4 changed files with 224 additions and 261 deletions.
3 changes: 3 additions & 0 deletions lib/ts/recipe/webauthn/api/implementation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
DEFAULT_REGISTER_OPTIONS_USER_VERIFICATION,
DEFAULT_SIGNIN_OPTIONS_TIMEOUT,
DEFAULT_SIGNIN_OPTIONS_USER_VERIFICATION,
DEFAULT_REGISTER_OPTIONS_SUPPORTED_ALGORITHM_IDS,
} from "../constants";
import RecipeUserId from "../../../recipeUserId";
import { getRecoverAccountLink } from "../utils";
Expand Down Expand Up @@ -88,6 +89,7 @@ export default function getAPIImplementation(): APIInterface {
const requireResidentKey = DEFAULT_REGISTER_OPTIONS_REQUIRE_RESIDENT_KEY;
const residentKey = DEFAULT_REGISTER_OPTIONS_RESIDENT_KEY;
const userVerification = DEFAULT_REGISTER_OPTIONS_USER_VERIFICATION;
const supportedAlgorithmIds = DEFAULT_REGISTER_OPTIONS_SUPPORTED_ALGORITHM_IDS;

let response = await options.recipeImplementation.registerOptions({
...props,
Expand All @@ -101,6 +103,7 @@ export default function getAPIImplementation(): APIInterface {
timeout,
tenantId,
userContext,
supportedAlgorithmIds,
});

if (response.status !== "OK") {
Expand Down
1 change: 1 addition & 0 deletions lib/ts/recipe/webauthn/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const DEFAULT_REGISTER_OPTIONS_ATTESTATION = "none";
export const DEFAULT_REGISTER_OPTIONS_REQUIRE_RESIDENT_KEY = false;
export const DEFAULT_REGISTER_OPTIONS_RESIDENT_KEY = "required";
export const DEFAULT_REGISTER_OPTIONS_USER_VERIFICATION = "preferred";
export const DEFAULT_REGISTER_OPTIONS_SUPPORTED_ALGORITHM_IDS = [-8, -7, -257];

export const DEFAULT_SIGNIN_OPTIONS_USER_VERIFICATION = "preferred";

Expand Down
Loading

0 comments on commit ea42bd1

Please sign in to comment.