dauth-context-react 6.7.0 → 6.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/dauth.api.ts +4 -0
package/dist/index.mjs
CHANGED
|
@@ -148,7 +148,8 @@ async function startPasskeyRegistrationAPI(basePath) {
|
|
|
148
148
|
method: "POST",
|
|
149
149
|
headers: {
|
|
150
150
|
"Content-Type": "application/json",
|
|
151
|
-
"X-CSRF-Token": getCsrfToken()
|
|
151
|
+
"X-CSRF-Token": getCsrfToken(),
|
|
152
|
+
"X-Client-Origin": window.location.origin
|
|
152
153
|
},
|
|
153
154
|
credentials: "include"
|
|
154
155
|
});
|
|
@@ -160,7 +161,8 @@ async function finishPasskeyRegistrationAPI(basePath, body) {
|
|
|
160
161
|
method: "POST",
|
|
161
162
|
headers: {
|
|
162
163
|
"Content-Type": "application/json",
|
|
163
|
-
"X-CSRF-Token": getCsrfToken()
|
|
164
|
+
"X-CSRF-Token": getCsrfToken(),
|
|
165
|
+
"X-Client-Origin": window.location.origin
|
|
164
166
|
},
|
|
165
167
|
credentials: "include",
|
|
166
168
|
body: JSON.stringify(body)
|
|
@@ -172,7 +174,8 @@ async function startPasskeyAuthAPI(basePath) {
|
|
|
172
174
|
const response = await fetch(`${basePath}/passkey/auth-start`, {
|
|
173
175
|
method: "POST",
|
|
174
176
|
headers: {
|
|
175
|
-
"Content-Type": "application/json"
|
|
177
|
+
"Content-Type": "application/json",
|
|
178
|
+
"X-Client-Origin": window.location.origin
|
|
176
179
|
},
|
|
177
180
|
credentials: "include"
|
|
178
181
|
});
|
|
@@ -183,7 +186,8 @@ async function finishPasskeyAuthAPI(basePath, body) {
|
|
|
183
186
|
const response = await fetch(`${basePath}/passkey/auth-finish`, {
|
|
184
187
|
method: "POST",
|
|
185
188
|
headers: {
|
|
186
|
-
"Content-Type": "application/json"
|
|
189
|
+
"Content-Type": "application/json",
|
|
190
|
+
"X-Client-Origin": window.location.origin
|
|
187
191
|
},
|
|
188
192
|
credentials: "include",
|
|
189
193
|
body: JSON.stringify(body)
|