@rhinestone/1auth 0.7.0 → 0.7.2
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/README.md +149 -34
- package/dist/{chunk-THKG3FAG.mjs → chunk-UXBBB7AV.mjs} +4 -4
- package/dist/{client-F4DnFM8d.d.mts → client-DvtGr2xn.d.mts} +2 -2
- package/dist/{client-B_CzDa_I.d.ts → client-Ewr_7x-d.d.ts} +2 -2
- package/dist/headless.d.mts +2 -2
- package/dist/headless.d.ts +2 -2
- package/dist/headless.js +1 -1
- package/dist/headless.js.map +1 -1
- package/dist/headless.mjs +1 -1
- package/dist/headless.mjs.map +1 -1
- package/dist/index.d.mts +9 -50
- package/dist/index.d.ts +9 -50
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -10
- package/dist/index.mjs.map +1 -1
- package/dist/{provider-Cd7Ip5L-.d.ts → provider-BRHZoB8U.d.ts} +2 -2
- package/dist/{provider-IvYXPMpk.d.mts → provider-NYl0jlHw.d.mts} +2 -2
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/server.d.mts +3 -3
- package/dist/server.d.ts +3 -3
- package/dist/server.js +54 -5
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +4 -0
- package/dist/server.mjs.map +1 -1
- package/dist/{types-U_dwxbtS.d.mts → types-C0jKNT_t.d.mts} +1 -1
- package/dist/{types-U_dwxbtS.d.ts → types-C0jKNT_t.d.ts} +1 -1
- package/dist/{verify-BLgZzwmJ.d.ts → verify-CnOwPq78.d.ts} +44 -3
- package/dist/{verify-C8-a5c3K.d.mts → verify-aWdi5O2z.d.mts} +44 -3
- package/dist/wagmi.d.mts +3 -3
- package/dist/wagmi.d.ts +3 -3
- package/dist/wagmi.mjs +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-THKG3FAG.mjs.map → chunk-UXBBB7AV.mjs.map} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -8,7 +8,12 @@ import {
|
|
|
8
8
|
} from "./chunk-IHBVEU33.mjs";
|
|
9
9
|
import {
|
|
10
10
|
createOneAuthProvider
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-UXBBB7AV.mjs";
|
|
12
|
+
import {
|
|
13
|
+
buildTransactionReview,
|
|
14
|
+
encodeWebAuthnSignature,
|
|
15
|
+
hashCalls
|
|
16
|
+
} from "./chunk-N6KE5CII.mjs";
|
|
12
17
|
import {
|
|
13
18
|
getAllSupportedChainsAndTokens,
|
|
14
19
|
getChainById,
|
|
@@ -26,11 +31,6 @@ import {
|
|
|
26
31
|
isTokenAddressSupported,
|
|
27
32
|
resolveTokenAddress
|
|
28
33
|
} from "./chunk-GUAI55LL.mjs";
|
|
29
|
-
import {
|
|
30
|
-
buildTransactionReview,
|
|
31
|
-
encodeWebAuthnSignature,
|
|
32
|
-
hashCalls
|
|
33
|
-
} from "./chunk-N6KE5CII.mjs";
|
|
34
34
|
|
|
35
35
|
// src/client.ts
|
|
36
36
|
import { hashTypedData } from "viem";
|
|
@@ -163,7 +163,7 @@ var POPUP_WIDTH = LOADING_MODAL_WIDTH;
|
|
|
163
163
|
var POPUP_HEIGHT = 600;
|
|
164
164
|
var DEFAULT_EMBED_WIDTH = `${LOADING_MODAL_WIDTH}px`;
|
|
165
165
|
var DEFAULT_EMBED_HEIGHT = "500px";
|
|
166
|
-
var DEFAULT_PROVIDER_URL = "https://passkey.1auth.
|
|
166
|
+
var DEFAULT_PROVIDER_URL = "https://passkey.1auth.app";
|
|
167
167
|
function currentWindowOrigin() {
|
|
168
168
|
if (typeof window === "undefined") return null;
|
|
169
169
|
const origin = window.location?.origin;
|
|
@@ -619,7 +619,7 @@ var OneAuthClient = class {
|
|
|
619
619
|
* Falls back to the raw dialog URL string if URL parsing fails (e.g. during
|
|
620
620
|
* unit tests with non-standard URL formats).
|
|
621
621
|
*
|
|
622
|
-
* @returns The scheme + host + optional port of the dialog app (e.g. `"https://passkey.1auth.
|
|
622
|
+
* @returns The scheme + host + optional port of the dialog app (e.g. `"https://passkey.1auth.app"`).
|
|
623
623
|
*/
|
|
624
624
|
getDialogOrigin() {
|
|
625
625
|
const dialogUrl = this.getDialogUrl();
|
|
@@ -1670,7 +1670,7 @@ var OneAuthClient = class {
|
|
|
1670
1670
|
};
|
|
1671
1671
|
const handleMessage = (event) => {
|
|
1672
1672
|
if (event.origin !== dialogOrigin) return;
|
|
1673
|
-
if (event.data?.type === "PASSKEY_CLOSE") {
|
|
1673
|
+
if (event.data?.type === "PASSKEY_CLOSE" && event.source === iframe.contentWindow) {
|
|
1674
1674
|
resolveClosed(iframeReadyObserved);
|
|
1675
1675
|
}
|
|
1676
1676
|
};
|
|
@@ -2369,7 +2369,7 @@ var OneAuthClient = class {
|
|
|
2369
2369
|
const dialogOrigin2 = this.getDialogOrigin();
|
|
2370
2370
|
const earlyCloseHandler = (event) => {
|
|
2371
2371
|
if (event.origin !== dialogOrigin2) return;
|
|
2372
|
-
if (event.data?.type === "PASSKEY_CLOSE") {
|
|
2372
|
+
if (event.data?.type === "PASSKEY_CLOSE" && event.source === iframe.contentWindow) {
|
|
2373
2373
|
userClosedEarly = true;
|
|
2374
2374
|
cleanup();
|
|
2375
2375
|
}
|