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 +3 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +16 -29
- package/src/index.tsx +1 -4
- package/src/webauthn.ts +2 -2
package/package.json
CHANGED
|
@@ -1,21 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dauth-context-react",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.7.0",
|
|
4
4
|
"description": "React provider and hook for passwordless authentication via the Dauth service (BFF pattern with httpOnly cookies)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "David T. Pizarro Frick",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"react",
|
|
9
|
-
"authentication",
|
|
10
|
-
"passwordless",
|
|
11
|
-
"magic-link",
|
|
12
|
-
"passkey",
|
|
13
|
-
"webauthn",
|
|
14
|
-
"multi-tenant",
|
|
15
9
|
"context",
|
|
16
|
-
"
|
|
17
|
-
"hook",
|
|
18
|
-
"dauth"
|
|
10
|
+
"authentication"
|
|
19
11
|
],
|
|
20
12
|
"main": "dist/index.js",
|
|
21
13
|
"module": "dist/index.mjs",
|
|
@@ -66,25 +58,20 @@
|
|
|
66
58
|
}
|
|
67
59
|
],
|
|
68
60
|
"devDependencies": {
|
|
69
|
-
"@size-limit/preset-small-lib": "^12.0.
|
|
70
|
-
"@testing-library/jest-dom": "~6.9.
|
|
71
|
-
"@testing-library/react": "~16.3.
|
|
72
|
-
"@types/react": "^19.
|
|
73
|
-
"@types/react-dom": "^19.
|
|
74
|
-
"@vitest/coverage-v8": "^4.0
|
|
75
|
-
"husky": "^9.
|
|
76
|
-
"jsdom": "~
|
|
61
|
+
"@size-limit/preset-small-lib": "^12.0.1",
|
|
62
|
+
"@testing-library/jest-dom": "~6.9.1",
|
|
63
|
+
"@testing-library/react": "~16.3.2",
|
|
64
|
+
"@types/react": "^19.2.14",
|
|
65
|
+
"@types/react-dom": "^19.2.3",
|
|
66
|
+
"@vitest/coverage-v8": "^4.1.0",
|
|
67
|
+
"husky": "^9.1.7",
|
|
68
|
+
"jsdom": "~29.0.0",
|
|
77
69
|
"prettier": "^3.8.1",
|
|
78
|
-
"react": "^19.
|
|
79
|
-
"react-dom": "^19.
|
|
80
|
-
"size-limit": "^12.0.
|
|
81
|
-
"tsup": "~8.5.
|
|
70
|
+
"react": "^19.2.4",
|
|
71
|
+
"react-dom": "^19.2.4",
|
|
72
|
+
"size-limit": "^12.0.1",
|
|
73
|
+
"tsup": "~8.5.1",
|
|
82
74
|
"typescript": "~5.9.3",
|
|
83
|
-
"vitest": "~4.
|
|
84
|
-
}
|
|
85
|
-
"keywords": [
|
|
86
|
-
"react",
|
|
87
|
-
"context",
|
|
88
|
-
"authentication"
|
|
89
|
-
]
|
|
75
|
+
"vitest": "~4.1.0"
|
|
76
|
+
}
|
|
90
77
|
}
|
package/src/index.tsx
CHANGED
|
@@ -92,10 +92,7 @@ export const DauthProvider: React.FC<IDauthProviderProps> = (
|
|
|
92
92
|
};
|
|
93
93
|
document.addEventListener('visibilitychange', handleVisibilityChange);
|
|
94
94
|
return () =>
|
|
95
|
-
document.removeEventListener(
|
|
96
|
-
'visibilitychange',
|
|
97
|
-
handleVisibilityChange
|
|
98
|
-
);
|
|
95
|
+
document.removeEventListener('visibilitychange', handleVisibilityChange);
|
|
99
96
|
}, [ctx, dauthState.isAuthenticated, dauthState.isLoading]);
|
|
100
97
|
|
|
101
98
|
const loginWithRedirect = useCallback(() => {
|
package/src/webauthn.ts
CHANGED
|
@@ -38,7 +38,7 @@ export async function createPasskeyCredential(
|
|
|
38
38
|
): Promise<Record<string, any>> {
|
|
39
39
|
const publicKey = {
|
|
40
40
|
...options,
|
|
41
|
-
rp:
|
|
41
|
+
rp: options.rp,
|
|
42
42
|
challenge: base64urlToBuffer(options.challenge),
|
|
43
43
|
user: {
|
|
44
44
|
...options.user,
|
|
@@ -105,7 +105,7 @@ export async function getPasskeyCredential(
|
|
|
105
105
|
const publicKey: PublicKeyCredentialRequestOptions = {
|
|
106
106
|
challenge: base64urlToBuffer(options.challenge),
|
|
107
107
|
timeout: options.timeout,
|
|
108
|
-
rpId:
|
|
108
|
+
rpId: options.rpId,
|
|
109
109
|
userVerification: options.userVerification || 'preferred',
|
|
110
110
|
allowCredentials: (options.allowCredentials || []).map(
|
|
111
111
|
(c: { id: string; type: string; transports?: string[] }) => ({
|