diff --git a/lib/build/authUtils.js b/lib/build/authUtils.js index 5b9ec7081..27b9d28d1 100644 --- a/lib/build/authUtils.js +++ b/lib/build/authUtils.js @@ -311,7 +311,6 @@ exports.AuthUtils = { logger_1.logDebugMessage( `getAuthenticatingUserAndAddToCurrentTenantIfRequired got ${existingUsers.length} users from the core resp` ); - console.log("existingUsers", existingUsers, accountInfo); const usersWithMatchingLoginMethods = existingUsers .map((user) => ({ user, diff --git a/lib/build/recipe/webauthn/api/implementation.js b/lib/build/recipe/webauthn/api/implementation.js index a5196e62d..b38e8f704 100644 --- a/lib/build/recipe/webauthn/api/implementation.js +++ b/lib/build/recipe/webauthn/api/implementation.js @@ -307,7 +307,6 @@ function getAPIImplementation() { tenantId, userContext, }); - console.log("generatedOptions", generatedOptions); if (generatedOptions.status !== "OK") { return { status: "INVALID_CREDENTIALS_ERROR", @@ -342,7 +341,6 @@ function getAPIImplementation() { // the implementation of that function, this way we can guarantee that either isSignInAllowed or // isSignUpAllowed will be called as expected. if (authenticatingUser === undefined) { - console.log("authenticatingUser is undefined"); return { status: "INVALID_CREDENTIALS_ERROR", }; @@ -392,7 +390,6 @@ function getAPIImplementation() { } if (utils_1.isFakeEmail(email) && preAuthChecks.isFirstFactor) { // Fake emails cannot be used as a first factor - console.log("isFakeEmail(email) && preAuthChecks.isFirstFactor"); return { status: "INVALID_CREDENTIALS_ERROR", }; @@ -405,13 +402,10 @@ function getAPIImplementation() { tenantId, userContext, }); - console.log("signInPOST signInResponse", signInResponse); if (signInResponse.status === "INVALID_CREDENTIALS_ERROR") { - console.log("signInResponse.status === 'INVALID_CREDENTIALS_ERROR'"); return signInResponse; } if (signInResponse.status !== "OK") { - console.log("signInResponse.status !== 'OK'"); return authUtils_1.AuthUtils.getErrorStatusResponseWithReason( signInResponse, errorCodeMap, @@ -430,7 +424,6 @@ function getAPIImplementation() { userContext, }); if (postAuthChecks.status !== "OK") { - console.log("postAuthChecks.status !== 'OK'", postAuthChecks); return authUtils_1.AuthUtils.getErrorStatusResponseWithReason( postAuthChecks, errorCodeMap, diff --git a/lib/build/recipe/webauthn/recipeImplementation.js b/lib/build/recipe/webauthn/recipeImplementation.js index fe08878a3..71c4a98a9 100644 --- a/lib/build/recipe/webauthn/recipeImplementation.js +++ b/lib/build/recipe/webauthn/recipeImplementation.js @@ -240,7 +240,6 @@ function getRecipeInterface(querier, getWebauthnConfig) { }, userContext ); - console.log("response", response); if (response.status === "OK") { return { status: "OK", diff --git a/lib/ts/authUtils.ts b/lib/ts/authUtils.ts index f0e4733d1..024b41d46 100644 --- a/lib/ts/authUtils.ts +++ b/lib/ts/authUtils.ts @@ -359,7 +359,6 @@ export const AuthUtils = { logDebugMessage( `getAuthenticatingUserAndAddToCurrentTenantIfRequired got ${existingUsers.length} users from the core resp` ); - console.log("existingUsers", existingUsers, accountInfo); const usersWithMatchingLoginMethods = existingUsers .map((user) => ({ user, diff --git a/lib/ts/recipe/webauthn/api/implementation.ts b/lib/ts/recipe/webauthn/api/implementation.ts index 18eb108fe..ceb8163cf 100644 --- a/lib/ts/recipe/webauthn/api/implementation.ts +++ b/lib/ts/recipe/webauthn/api/implementation.ts @@ -424,7 +424,6 @@ export default function getAPIImplementation(): APIInterface { tenantId, userContext, }); - console.log("generatedOptions", generatedOptions); if (generatedOptions.status !== "OK") { return { status: "INVALID_CREDENTIALS_ERROR", @@ -461,7 +460,6 @@ export default function getAPIImplementation(): APIInterface { // the implementation of that function, this way we can guarantee that either isSignInAllowed or // isSignUpAllowed will be called as expected. if (authenticatingUser === undefined) { - console.log("authenticatingUser is undefined"); return { status: "INVALID_CREDENTIALS_ERROR", }; @@ -500,7 +498,6 @@ export default function getAPIImplementation(): APIInterface { if (isFakeEmail(email) && preAuthChecks.isFirstFactor) { // Fake emails cannot be used as a first factor - console.log("isFakeEmail(email) && preAuthChecks.isFirstFactor"); return { status: "INVALID_CREDENTIALS_ERROR", }; @@ -514,14 +511,11 @@ export default function getAPIImplementation(): APIInterface { tenantId, userContext, }); - console.log("signInPOST signInResponse", signInResponse); if (signInResponse.status === "INVALID_CREDENTIALS_ERROR") { - console.log("signInResponse.status === 'INVALID_CREDENTIALS_ERROR'"); return signInResponse; } if (signInResponse.status !== "OK") { - console.log("signInResponse.status !== 'OK'"); return AuthUtils.getErrorStatusResponseWithReason(signInResponse, errorCodeMap, "SIGN_IN_NOT_ALLOWED"); } @@ -538,7 +532,6 @@ export default function getAPIImplementation(): APIInterface { }); if (postAuthChecks.status !== "OK") { - console.log("postAuthChecks.status !== 'OK'", postAuthChecks); return AuthUtils.getErrorStatusResponseWithReason(postAuthChecks, errorCodeMap, "SIGN_IN_NOT_ALLOWED"); } diff --git a/lib/ts/recipe/webauthn/recipeImplementation.ts b/lib/ts/recipe/webauthn/recipeImplementation.ts index 7165926d6..056d10cd5 100644 --- a/lib/ts/recipe/webauthn/recipeImplementation.ts +++ b/lib/ts/recipe/webauthn/recipeImplementation.ts @@ -217,8 +217,6 @@ export default function getRecipeInterface( userContext ); - console.log("response", response); - if (response.status === "OK") { return { status: "OK", diff --git a/test/webauthn/apis.test.js b/test/webauthn/apis.test.js index b99901e3c..98818719e 100644 --- a/test/webauthn/apis.test.js +++ b/test/webauthn/apis.test.js @@ -550,6 +550,9 @@ describe(`apisFunctions: ${printPath("[test/webauthn/apis.test.js]")}`, function assert(signInResponse.status === "INVALID_CREDENTIALS_ERROR"); }); + + it("should fail signIn if there is no credential registered for the user", async function () {}); + it("should allow signIn multiple times with the same credential", async function () {}); }); describe("[generateRecoverAccountTokenPOST]", function () {