Skip to content

Commit

Permalink
updated tests and added userPresence support
Browse files Browse the repository at this point in the history
  • Loading branch information
niftyvictor committed Feb 10, 2025
1 parent 5308253 commit 5b87089
Show file tree
Hide file tree
Showing 22 changed files with 60 additions and 962 deletions.
3 changes: 0 additions & 3 deletions lib/build/core-mock.d.ts

This file was deleted.

217 changes: 0 additions & 217 deletions lib/build/core-mock.js

This file was deleted.

4 changes: 4 additions & 0 deletions lib/build/recipe/webauthn/api/implementation.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,14 @@ function getAPIImplementation() {
const attestation = constants_1.DEFAULT_REGISTER_OPTIONS_ATTESTATION;
const residentKey = constants_1.DEFAULT_REGISTER_OPTIONS_RESIDENT_KEY;
const userVerification = constants_1.DEFAULT_REGISTER_OPTIONS_USER_VERIFICATION;
const userPresence = constants_1.DEFAULT_REGISTER_OPTIONS_USER_PRESENCE;
const supportedAlgorithmIds = constants_1.DEFAULT_REGISTER_OPTIONS_SUPPORTED_ALGORITHM_IDS;
let response = await options.recipeImplementation.registerOptions(
Object.assign(Object.assign({}, props), {
attestation,
residentKey,
userVerification,
userPresence,
origin,
relyingPartyId,
relyingPartyName,
Expand Down Expand Up @@ -99,8 +101,10 @@ function getAPIImplementation() {
});
const timeout = constants_1.DEFAULT_SIGNIN_OPTIONS_TIMEOUT;
const userVerification = constants_1.DEFAULT_SIGNIN_OPTIONS_USER_VERIFICATION;
const userPresence = constants_1.DEFAULT_SIGNIN_OPTIONS_USER_PRESENCE;
let response = await options.recipeImplementation.signInOptions({
userVerification,
userPresence,
origin,
relyingPartyId,
relyingPartyName,
Expand Down
2 changes: 2 additions & 0 deletions lib/build/recipe/webauthn/constants.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ export declare const SIGNUP_EMAIL_EXISTS_API = "/webauthn/email/exists";
export declare const DEFAULT_REGISTER_OPTIONS_ATTESTATION = "none";
export declare const DEFAULT_REGISTER_OPTIONS_RESIDENT_KEY = "required";
export declare const DEFAULT_REGISTER_OPTIONS_USER_VERIFICATION = "preferred";
export declare const DEFAULT_REGISTER_OPTIONS_USER_PRESENCE = true;
export declare const DEFAULT_REGISTER_OPTIONS_SUPPORTED_ALGORITHM_IDS: number[];
export declare const DEFAULT_SIGNIN_OPTIONS_USER_VERIFICATION = "preferred";
export declare const DEFAULT_SIGNIN_OPTIONS_USER_PRESENCE = true;
export declare const DEFAULT_REGISTER_OPTIONS_TIMEOUT = 10000;
export declare const DEFAULT_SIGNIN_OPTIONS_TIMEOUT = 5000;
4 changes: 3 additions & 1 deletion lib/build/recipe/webauthn/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.DEFAULT_SIGNIN_OPTIONS_TIMEOUT = exports.DEFAULT_REGISTER_OPTIONS_TIMEOUT = exports.DEFAULT_SIGNIN_OPTIONS_USER_VERIFICATION = exports.DEFAULT_REGISTER_OPTIONS_SUPPORTED_ALGORITHM_IDS = exports.DEFAULT_REGISTER_OPTIONS_USER_VERIFICATION = exports.DEFAULT_REGISTER_OPTIONS_RESIDENT_KEY = exports.DEFAULT_REGISTER_OPTIONS_ATTESTATION = exports.SIGNUP_EMAIL_EXISTS_API = exports.RECOVER_ACCOUNT_API = exports.GENERATE_RECOVER_ACCOUNT_TOKEN_API = exports.SIGN_IN_API = exports.SIGN_UP_API = exports.SIGNIN_OPTIONS_API = exports.REGISTER_OPTIONS_API = void 0;
exports.DEFAULT_SIGNIN_OPTIONS_TIMEOUT = exports.DEFAULT_REGISTER_OPTIONS_TIMEOUT = exports.DEFAULT_SIGNIN_OPTIONS_USER_PRESENCE = exports.DEFAULT_SIGNIN_OPTIONS_USER_VERIFICATION = exports.DEFAULT_REGISTER_OPTIONS_SUPPORTED_ALGORITHM_IDS = exports.DEFAULT_REGISTER_OPTIONS_USER_PRESENCE = exports.DEFAULT_REGISTER_OPTIONS_USER_VERIFICATION = exports.DEFAULT_REGISTER_OPTIONS_RESIDENT_KEY = exports.DEFAULT_REGISTER_OPTIONS_ATTESTATION = exports.SIGNUP_EMAIL_EXISTS_API = exports.RECOVER_ACCOUNT_API = exports.GENERATE_RECOVER_ACCOUNT_TOKEN_API = exports.SIGN_IN_API = exports.SIGN_UP_API = exports.SIGNIN_OPTIONS_API = exports.REGISTER_OPTIONS_API = void 0;
exports.REGISTER_OPTIONS_API = "/webauthn/options/register";
exports.SIGNIN_OPTIONS_API = "/webauthn/options/signin";
exports.SIGN_UP_API = "/webauthn/signup";
Expand All @@ -26,7 +26,9 @@ exports.SIGNUP_EMAIL_EXISTS_API = "/webauthn/email/exists";
exports.DEFAULT_REGISTER_OPTIONS_ATTESTATION = "none";
exports.DEFAULT_REGISTER_OPTIONS_RESIDENT_KEY = "required";
exports.DEFAULT_REGISTER_OPTIONS_USER_VERIFICATION = "preferred";
exports.DEFAULT_REGISTER_OPTIONS_USER_PRESENCE = true;
exports.DEFAULT_REGISTER_OPTIONS_SUPPORTED_ALGORITHM_IDS = [-8, -7, -257];
exports.DEFAULT_SIGNIN_OPTIONS_USER_VERIFICATION = "preferred";
exports.DEFAULT_SIGNIN_OPTIONS_USER_PRESENCE = true;
exports.DEFAULT_REGISTER_OPTIONS_TIMEOUT = 10000;
exports.DEFAULT_SIGNIN_OPTIONS_TIMEOUT = 5000;
3 changes: 0 additions & 3 deletions lib/build/recipe/webauthn/core-mock.d.ts

This file was deleted.

Loading

0 comments on commit 5b87089

Please sign in to comment.