From b0aa1974de359685410f407274d8d5095fdb0f06 Mon Sep 17 00:00:00 2001 From: Felix Deibert <24978665+deibertf@users.noreply.github.com> Date: Thu, 16 Feb 2023 00:10:01 +0100 Subject: [PATCH] Update webauthn.js --- resources/js/webauthn.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/js/webauthn.js b/resources/js/webauthn.js index 4350d2c..3775af6 100644 --- a/resources/js/webauthn.js +++ b/resources/js/webauthn.js @@ -156,7 +156,9 @@ class WebAuthn { * @returns {Promise} */ #fetch(data, route, headers = {}) { - return fetch(route, { + + let url = new URL(route, window.location.origin).href; + return fetch(url, { method: "POST", credentials: this.#includeCredentials ? "include" : "same-origin", redirect: "error",