dauth-context-react 6.6.2 → 6.7.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 +6 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +16 -29
- package/src/index.tsx +1 -4
- package/src/reducer/dauth.actions.ts +3 -1
- package/src/webauthn.ts +2 -2
package/dist/index.mjs
CHANGED
|
@@ -239,7 +239,7 @@ function bufferToBase64url(buffer) {
|
|
|
239
239
|
async function createPasskeyCredential(options) {
|
|
240
240
|
const publicKey = {
|
|
241
241
|
...options,
|
|
242
|
-
rp:
|
|
242
|
+
rp: options.rp,
|
|
243
243
|
challenge: base64urlToBuffer(options.challenge),
|
|
244
244
|
user: {
|
|
245
245
|
...options.user,
|
|
@@ -285,7 +285,7 @@ async function getPasskeyCredential(options) {
|
|
|
285
285
|
const publicKey = {
|
|
286
286
|
challenge: base64urlToBuffer(options.challenge),
|
|
287
287
|
timeout: options.timeout,
|
|
288
|
-
rpId:
|
|
288
|
+
rpId: options.rpId,
|
|
289
289
|
userVerification: options.userVerification || "preferred",
|
|
290
290
|
allowCredentials: (options.allowCredentials || []).map(
|
|
291
291
|
(c) => ({
|
|
@@ -459,7 +459,9 @@ async function registerPasskeyAction(ctx, name) {
|
|
|
459
459
|
onError(new Error("Failed to start passkey registration"));
|
|
460
460
|
return null;
|
|
461
461
|
}
|
|
462
|
-
const credential = await createPasskeyCredential(
|
|
462
|
+
const credential = await createPasskeyCredential(
|
|
463
|
+
startResult.data.options
|
|
464
|
+
);
|
|
463
465
|
const finishResult = await finishPasskeyRegistrationAPI(authProxyPath, {
|
|
464
466
|
credential,
|
|
465
467
|
name
|
|
@@ -2205,10 +2207,7 @@ var DauthProvider = (props) => {
|
|
|
2205
2207
|
}
|
|
2206
2208
|
};
|
|
2207
2209
|
document.addEventListener("visibilitychange", handleVisibilityChange);
|
|
2208
|
-
return () => document.removeEventListener(
|
|
2209
|
-
"visibilitychange",
|
|
2210
|
-
handleVisibilityChange
|
|
2211
|
-
);
|
|
2210
|
+
return () => document.removeEventListener("visibilitychange", handleVisibilityChange);
|
|
2212
2211
|
}, [ctx, dauthState.isAuthenticated, dauthState.isLoading]);
|
|
2213
2212
|
const loginWithRedirect = useCallback2(() => {
|
|
2214
2213
|
const base = `${getClientBasePath()}/${domainName}/${routes.signin}`;
|