dauth-context-react 6.6.3 → 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 CHANGED
@@ -258,7 +258,7 @@ function bufferToBase64url(buffer) {
258
258
  async function createPasskeyCredential(options) {
259
259
  const publicKey = {
260
260
  ...options,
261
- rp: { ...options.rp, id: window.location.hostname },
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: window.location.hostname,
307
+ rpId: options.rpId,
308
308
  userVerification: options.userVerification || "preferred",
309
309
  allowCredentials: (options.allowCredentials || []).map(
310
310
  (c) => ({
@@ -2220,10 +2220,7 @@ var DauthProvider = (props) => {
2220
2220
  }
2221
2221
  };
2222
2222
  document.addEventListener("visibilitychange", handleVisibilityChange);
2223
- return () => document.removeEventListener(
2224
- "visibilitychange",
2225
- handleVisibilityChange
2226
- );
2223
+ return () => document.removeEventListener("visibilitychange", handleVisibilityChange);
2227
2224
  }, [ctx, dauthState.isAuthenticated, dauthState.isLoading]);
2228
2225
  const loginWithRedirect = (0, import_react2.useCallback)(() => {
2229
2226
  const base = `${getClientBasePath()}/${domainName}/${routes.signin}`;