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.js
CHANGED
|
@@ -258,7 +258,7 @@ function bufferToBase64url(buffer) {
|
|
|
258
258
|
async function createPasskeyCredential(options) {
|
|
259
259
|
const publicKey = {
|
|
260
260
|
...options,
|
|
261
|
-
rp:
|
|
261
|
+
rp: options.rp,
|
|
262
262
|
challenge: base64urlToBuffer(options.challenge),
|
|
263
263
|
user: {
|
|
264
264
|
...options.user,
|
|
@@ -304,7 +304,7 @@ async function getPasskeyCredential(options) {
|
|
|
304
304
|
const publicKey = {
|
|
305
305
|
challenge: base64urlToBuffer(options.challenge),
|
|
306
306
|
timeout: options.timeout,
|
|
307
|
-
rpId:
|
|
307
|
+
rpId: options.rpId,
|
|
308
308
|
userVerification: options.userVerification || "preferred",
|
|
309
309
|
allowCredentials: (options.allowCredentials || []).map(
|
|
310
310
|
(c) => ({
|
|
@@ -478,7 +478,9 @@ async function registerPasskeyAction(ctx, name) {
|
|
|
478
478
|
onError(new Error("Failed to start passkey registration"));
|
|
479
479
|
return null;
|
|
480
480
|
}
|
|
481
|
-
const credential = await createPasskeyCredential(
|
|
481
|
+
const credential = await createPasskeyCredential(
|
|
482
|
+
startResult.data.options
|
|
483
|
+
);
|
|
482
484
|
const finishResult = await finishPasskeyRegistrationAPI(authProxyPath, {
|
|
483
485
|
credential,
|
|
484
486
|
name
|
|
@@ -2218,10 +2220,7 @@ var DauthProvider = (props) => {
|
|
|
2218
2220
|
}
|
|
2219
2221
|
};
|
|
2220
2222
|
document.addEventListener("visibilitychange", handleVisibilityChange);
|
|
2221
|
-
return () => document.removeEventListener(
|
|
2222
|
-
"visibilitychange",
|
|
2223
|
-
handleVisibilityChange
|
|
2224
|
-
);
|
|
2223
|
+
return () => document.removeEventListener("visibilitychange", handleVisibilityChange);
|
|
2225
2224
|
}, [ctx, dauthState.isAuthenticated, dauthState.isLoading]);
|
|
2226
2225
|
const loginWithRedirect = (0, import_react2.useCallback)(() => {
|
|
2227
2226
|
const base = `${getClientBasePath()}/${domainName}/${routes.signin}`;
|