Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added API testing for missing methods #964

Merged
merged 3 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

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

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

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

2 changes: 1 addition & 1 deletion lib/build/recipe/webauthn/api/implementation.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ function getAPIImplementation() {
session,
shouldTryLinkingWithSessionUser,
});
if (preAuthChecks.status === "SIGN_UP_NOT_ALLOWED") {
if (preAuthChecks.status === "SIGN_IN_NOT_ALLOWED") {
throw new Error("This should never happen: pre-auth checks should not fail for sign in");
}
if (preAuthChecks.status !== "OK") {
Expand Down
16 changes: 16 additions & 0 deletions lib/build/recipe/webauthn/api/signInOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,29 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
var __importDefault =
(this && this.__importDefault) ||
function (mod) {
return mod && mod.__esModule ? mod : { default: mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("../../../utils");
const error_1 = __importDefault(require("../error"));
async function signInOptions(apiImplementation, tenantId, options, userContext) {
var _a;
if (apiImplementation.signInOptionsPOST === undefined) {
return false;
}
const requestBody = await options.req.getJSONBody();
let email = (_a = requestBody.email) === null || _a === void 0 ? void 0 : _a.trim();
if (email === undefined || typeof email !== "string") {
throw new error_1.default({
type: error_1.default.BAD_INPUT_ERROR,
message: "Please provide the email",
});
}
let result = await apiImplementation.signInOptionsPOST({
email,
tenantId,
options,
userContext,
Expand Down
107 changes: 0 additions & 107 deletions lib/build/recipe/webauthn/core-mock.js

This file was deleted.

Loading
Loading