@crossmint/client-sdk-react-ui 1.9.2 → 1.10.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/chunk-2LTCJUPK.cjs +31 -0
- package/dist/chunk-2LTCJUPK.cjs.map +1 -0
- package/dist/chunk-2QB7GW4K.cjs +64 -0
- package/dist/chunk-2QB7GW4K.cjs.map +1 -0
- package/dist/chunk-2T2VCED7.js +17 -0
- package/dist/chunk-2T2VCED7.js.map +1 -0
- package/dist/chunk-33WZFL2D.js +80 -0
- package/dist/chunk-33WZFL2D.js.map +1 -0
- package/dist/chunk-35RV5AOT.cjs +70 -0
- package/dist/chunk-35RV5AOT.cjs.map +1 -0
- package/dist/chunk-3J6CUUWT.js +50 -0
- package/dist/chunk-3J6CUUWT.js.map +1 -0
- package/dist/chunk-3KR4GYLF.js +26 -0
- package/dist/chunk-3KR4GYLF.js.map +1 -0
- package/dist/chunk-3RXUFZTR.cjs +14 -0
- package/dist/chunk-3RXUFZTR.cjs.map +1 -0
- package/dist/chunk-43P7QWBK.cjs +17 -0
- package/dist/chunk-43P7QWBK.cjs.map +1 -0
- package/dist/chunk-46UDUOKJ.cjs +10 -0
- package/dist/chunk-46UDUOKJ.cjs.map +1 -0
- package/dist/chunk-4DAZAO6Y.cjs +59 -0
- package/dist/chunk-4DAZAO6Y.cjs.map +1 -0
- package/dist/chunk-5JAEV6YP.js +81 -0
- package/dist/chunk-5JAEV6YP.js.map +1 -0
- package/dist/chunk-5KK3YQWD.cjs +1 -0
- package/dist/chunk-5KK3YQWD.cjs.map +1 -0
- package/dist/chunk-5RX5WFEW.cjs +11 -0
- package/dist/chunk-5RX5WFEW.cjs.map +1 -0
- package/dist/chunk-5S4VO6RB.cjs +55 -0
- package/dist/chunk-5S4VO6RB.cjs.map +1 -0
- package/dist/chunk-5VZNJ4VT.js +36 -0
- package/dist/chunk-5VZNJ4VT.js.map +1 -0
- package/dist/chunk-657ZCQSH.cjs +31 -0
- package/dist/chunk-657ZCQSH.cjs.map +1 -0
- package/dist/chunk-6DNBJVR5.js +64 -0
- package/dist/chunk-6DNBJVR5.js.map +1 -0
- package/dist/chunk-6LO4NSRH.cjs +21 -0
- package/dist/chunk-6LO4NSRH.cjs.map +1 -0
- package/dist/chunk-7KIY6DLW.js +28 -0
- package/dist/chunk-7KIY6DLW.js.map +1 -0
- package/dist/chunk-7SBZ6OIH.js +1 -0
- package/dist/chunk-7SBZ6OIH.js.map +1 -0
- package/dist/chunk-A2JCJ2OV.cjs +119 -0
- package/dist/chunk-A2JCJ2OV.cjs.map +1 -0
- package/dist/chunk-A7J4DAE7.js +16 -0
- package/dist/chunk-A7J4DAE7.js.map +1 -0
- package/dist/chunk-ATHR4S2P.js +48 -0
- package/dist/chunk-ATHR4S2P.js.map +1 -0
- package/dist/chunk-AUEQQ4D3.js +119 -0
- package/dist/chunk-AUEQQ4D3.js.map +1 -0
- package/dist/chunk-AXZLLRBU.cjs +26 -0
- package/dist/chunk-AXZLLRBU.cjs.map +1 -0
- package/dist/chunk-B7LYPQ4K.cjs +38 -0
- package/dist/chunk-B7LYPQ4K.cjs.map +1 -0
- package/dist/chunk-BE2ZLB3L.cjs +19 -0
- package/dist/chunk-BE2ZLB3L.cjs.map +1 -0
- package/dist/chunk-BJIMCGIQ.js +22 -0
- package/dist/chunk-BJIMCGIQ.js.map +1 -0
- package/dist/chunk-BKVDVDKX.cjs +1 -0
- package/dist/chunk-BKVDVDKX.cjs.map +1 -0
- package/dist/chunk-BYRVAFBZ.cjs +52 -0
- package/dist/chunk-BYRVAFBZ.cjs.map +1 -0
- package/dist/chunk-C2VARNXL.js +70 -0
- package/dist/chunk-C2VARNXL.js.map +1 -0
- package/dist/chunk-CIZ2K2TA.cjs +81 -0
- package/dist/chunk-CIZ2K2TA.cjs.map +1 -0
- package/dist/chunk-CPYPI45H.js +98 -0
- package/dist/chunk-CPYPI45H.js.map +1 -0
- package/dist/chunk-CRTRMMJ7.js +59 -0
- package/dist/chunk-CRTRMMJ7.js.map +1 -0
- package/dist/chunk-CUODMU27.js +1265 -0
- package/dist/chunk-CUODMU27.js.map +1 -0
- package/dist/chunk-CYUTXV7Z.js +17 -0
- package/dist/chunk-CYUTXV7Z.js.map +1 -0
- package/dist/chunk-DJ32OEWG.cjs +54 -0
- package/dist/chunk-DJ32OEWG.cjs.map +1 -0
- package/dist/chunk-DZ5MGN25.js +147 -0
- package/dist/chunk-DZ5MGN25.js.map +1 -0
- package/dist/chunk-E3BR6DXY.js +153 -0
- package/dist/chunk-E3BR6DXY.js.map +1 -0
- package/dist/chunk-ENCR5SUW.cjs +51 -0
- package/dist/chunk-ENCR5SUW.cjs.map +1 -0
- package/dist/chunk-EOWJ7775.js +18 -0
- package/dist/chunk-EOWJ7775.js.map +1 -0
- package/dist/chunk-EVL7VEPX.js +14 -0
- package/dist/chunk-EVL7VEPX.js.map +1 -0
- package/dist/chunk-FH7TEEZR.js +52 -0
- package/dist/chunk-FH7TEEZR.js.map +1 -0
- package/dist/chunk-FKIMKZ4Y.js +17 -0
- package/dist/chunk-FKIMKZ4Y.js.map +1 -0
- package/dist/chunk-FOCUIKYH.cjs +1265 -0
- package/dist/chunk-FOCUIKYH.cjs.map +1 -0
- package/dist/chunk-GY6G3ZC2.cjs +41 -0
- package/dist/chunk-GY6G3ZC2.cjs.map +1 -0
- package/dist/chunk-GZRGZKN6.js +31 -0
- package/dist/chunk-GZRGZKN6.js.map +1 -0
- package/dist/chunk-H4F7UVPT.js +34 -0
- package/dist/chunk-H4F7UVPT.js.map +1 -0
- package/dist/chunk-HATQVB6H.js +19 -0
- package/dist/chunk-HATQVB6H.js.map +1 -0
- package/dist/chunk-HCW4RO2O.cjs +29 -0
- package/dist/chunk-HCW4RO2O.cjs.map +1 -0
- package/dist/chunk-HPOZ6I54.cjs +44 -0
- package/dist/chunk-HPOZ6I54.cjs.map +1 -0
- package/dist/chunk-I63FQCIV.js +189 -0
- package/dist/chunk-I63FQCIV.js.map +1 -0
- package/dist/chunk-IP4HQL5I.cjs +147 -0
- package/dist/chunk-IP4HQL5I.cjs.map +1 -0
- package/dist/chunk-IQPA3QOV.js +27 -0
- package/dist/chunk-IQPA3QOV.js.map +1 -0
- package/dist/chunk-IVNGVLGR.cjs +153 -0
- package/dist/chunk-IVNGVLGR.cjs.map +1 -0
- package/dist/chunk-KAXBBO66.cjs +30 -0
- package/dist/chunk-KAXBBO66.cjs.map +1 -0
- package/dist/chunk-KEKBOJCF.cjs +50 -0
- package/dist/chunk-KEKBOJCF.cjs.map +1 -0
- package/dist/chunk-KLWDDALZ.cjs +14 -0
- package/dist/chunk-KLWDDALZ.cjs.map +1 -0
- package/dist/chunk-KNOUJZN5.cjs +32 -0
- package/dist/chunk-KNOUJZN5.cjs.map +1 -0
- package/dist/chunk-L3FKENHU.js +14 -0
- package/dist/chunk-L3FKENHU.js.map +1 -0
- package/dist/chunk-LKO5WR7D.js +64 -0
- package/dist/chunk-LKO5WR7D.js.map +1 -0
- package/dist/chunk-MH37OJT2.cjs +80 -0
- package/dist/chunk-MH37OJT2.cjs.map +1 -0
- package/dist/chunk-MJHLKJ6X.cjs +212 -0
- package/dist/chunk-MJHLKJ6X.cjs.map +1 -0
- package/dist/chunk-MUS7DUPS.cjs +98 -0
- package/dist/chunk-MUS7DUPS.cjs.map +1 -0
- package/dist/chunk-NMXFWIFA.js +133 -0
- package/dist/chunk-NMXFWIFA.js.map +1 -0
- package/dist/chunk-ODH26VGS.js +50 -0
- package/dist/chunk-ODH26VGS.js.map +1 -0
- package/dist/chunk-OPIHF55A.cjs +50 -0
- package/dist/chunk-OPIHF55A.cjs.map +1 -0
- package/dist/chunk-OZS4WEKF.js +55 -0
- package/dist/chunk-OZS4WEKF.js.map +1 -0
- package/dist/chunk-PBSL6JOF.cjs +17 -0
- package/dist/chunk-PBSL6JOF.cjs.map +1 -0
- package/dist/chunk-PHCGCJSA.js +107 -0
- package/dist/chunk-PHCGCJSA.js.map +1 -0
- package/dist/chunk-Q3M4UH5U.cjs +48 -0
- package/dist/chunk-Q3M4UH5U.cjs.map +1 -0
- package/dist/chunk-QDKAU3H2.js +31 -0
- package/dist/chunk-QDKAU3H2.js.map +1 -0
- package/dist/chunk-QFQWKKVU.js +11 -0
- package/dist/chunk-QFQWKKVU.js.map +1 -0
- package/dist/chunk-QJ44PL7L.js +41 -0
- package/dist/chunk-QJ44PL7L.js.map +1 -0
- package/dist/chunk-QK5J7FD3.cjs +11 -0
- package/dist/chunk-QK5J7FD3.cjs.map +1 -0
- package/dist/chunk-QQXBYOKA.cjs +16 -0
- package/dist/chunk-QQXBYOKA.cjs.map +1 -0
- package/dist/chunk-QT7UEJZG.cjs +133 -0
- package/dist/chunk-QT7UEJZG.cjs.map +1 -0
- package/dist/chunk-QTL5I5C2.js +38 -0
- package/dist/chunk-QTL5I5C2.js.map +1 -0
- package/dist/chunk-R6IL3WOE.cjs +31 -0
- package/dist/chunk-R6IL3WOE.cjs.map +1 -0
- package/dist/chunk-REUYMHNW.cjs +136 -0
- package/dist/chunk-REUYMHNW.cjs.map +1 -0
- package/dist/chunk-RWS44QDX.js +31 -0
- package/dist/chunk-RWS44QDX.js.map +1 -0
- package/dist/chunk-RZPQIRIY.js +11 -0
- package/dist/chunk-RZPQIRIY.js.map +1 -0
- package/dist/chunk-RZT2J42J.js +29 -0
- package/dist/chunk-RZT2J42J.js.map +1 -0
- package/dist/chunk-SBA6FMFT.cjs +18 -0
- package/dist/chunk-SBA6FMFT.cjs.map +1 -0
- package/dist/chunk-SZA3XDJ5.cjs +1 -0
- package/dist/chunk-SZA3XDJ5.cjs.map +1 -0
- package/dist/chunk-U2D3L4DZ.cjs +17 -0
- package/dist/chunk-U2D3L4DZ.cjs.map +1 -0
- package/dist/chunk-U5EONMPH.js +30 -0
- package/dist/chunk-U5EONMPH.js.map +1 -0
- package/dist/chunk-UASNCH3A.cjs +27 -0
- package/dist/chunk-UASNCH3A.cjs.map +1 -0
- package/dist/chunk-UC3GWTEN.js +136 -0
- package/dist/chunk-UC3GWTEN.js.map +1 -0
- package/dist/chunk-UCQ5VAPT.cjs +36 -0
- package/dist/chunk-UCQ5VAPT.cjs.map +1 -0
- package/dist/chunk-UQAKJ4T7.cjs +29 -0
- package/dist/chunk-UQAKJ4T7.cjs.map +1 -0
- package/dist/chunk-URKPLEPV.cjs +189 -0
- package/dist/chunk-URKPLEPV.cjs.map +1 -0
- package/dist/chunk-VWRC3IFZ.cjs +22 -0
- package/dist/chunk-VWRC3IFZ.cjs.map +1 -0
- package/dist/chunk-VZIXXIU5.js +32 -0
- package/dist/chunk-VZIXXIU5.js.map +1 -0
- package/dist/chunk-WK5RAFJ3.js +54 -0
- package/dist/chunk-WK5RAFJ3.js.map +1 -0
- package/dist/chunk-XDJ6F7N4.cjs +107 -0
- package/dist/chunk-XDJ6F7N4.cjs.map +1 -0
- package/dist/chunk-XEZF7G64.js +212 -0
- package/dist/chunk-XEZF7G64.js.map +1 -0
- package/dist/chunk-XXJ7LQ44.js +1 -0
- package/dist/chunk-XXJ7LQ44.js.map +1 -0
- package/dist/chunk-XYMYRPVT.js +1 -0
- package/dist/chunk-XYMYRPVT.js.map +1 -0
- package/dist/chunk-YB66RCZP.js +10 -0
- package/dist/chunk-YB66RCZP.js.map +1 -0
- package/dist/chunk-YE55IKBP.cjs +34 -0
- package/dist/chunk-YE55IKBP.cjs.map +1 -0
- package/dist/chunk-YWVQCHQF.js +51 -0
- package/dist/chunk-YWVQCHQF.js.map +1 -0
- package/dist/chunk-ZCYU7QA6.cjs +64 -0
- package/dist/chunk-ZCYU7QA6.cjs.map +1 -0
- package/dist/chunk-ZDQGQY7Z.js +29 -0
- package/dist/chunk-ZDQGQY7Z.js.map +1 -0
- package/dist/chunk-ZIHCLVCD.js +44 -0
- package/dist/chunk-ZIHCLVCD.js.map +1 -0
- package/dist/chunk-ZMSST6ZZ.cjs +28 -0
- package/dist/chunk-ZMSST6ZZ.cjs.map +1 -0
- package/dist/chunk-ZUIS3FET.js +21 -0
- package/dist/chunk-ZUIS3FET.js.map +1 -0
- package/dist/components/CrossmintNFTCollectionView.cjs +9 -0
- package/dist/components/CrossmintNFTCollectionView.cjs.map +1 -0
- package/dist/components/CrossmintNFTCollectionView.d.cts +6 -0
- package/dist/components/CrossmintNFTCollectionView.d.ts +6 -0
- package/dist/components/CrossmintNFTCollectionView.js +9 -0
- package/dist/components/CrossmintNFTCollectionView.js.map +1 -0
- package/dist/components/CrossmintNFTDetail.cjs +9 -0
- package/dist/components/CrossmintNFTDetail.cjs.map +1 -0
- package/dist/components/CrossmintNFTDetail.d.cts +6 -0
- package/dist/components/CrossmintNFTDetail.d.ts +6 -0
- package/dist/components/CrossmintNFTDetail.js +9 -0
- package/dist/components/CrossmintNFTDetail.js.map +1 -0
- package/dist/components/auth/AuthForm.cjs +37 -0
- package/dist/components/auth/AuthForm.cjs.map +1 -0
- package/dist/components/auth/AuthForm.d.cts +7 -0
- package/dist/components/auth/AuthForm.d.ts +7 -0
- package/dist/components/auth/AuthForm.js +37 -0
- package/dist/components/auth/AuthForm.js.map +1 -0
- package/dist/components/auth/AuthFormBackButton.cjs +10 -0
- package/dist/components/auth/AuthFormBackButton.cjs.map +1 -0
- package/dist/components/auth/AuthFormBackButton.d.cts +9 -0
- package/dist/components/auth/AuthFormBackButton.d.ts +9 -0
- package/dist/components/auth/AuthFormBackButton.js +10 -0
- package/dist/components/auth/AuthFormBackButton.js.map +1 -0
- package/dist/components/auth/AuthFormDialog.cjs +37 -0
- package/dist/components/auth/AuthFormDialog.cjs.map +1 -0
- package/dist/components/auth/AuthFormDialog.d.cts +7 -0
- package/dist/components/auth/AuthFormDialog.d.ts +7 -0
- package/dist/components/auth/AuthFormDialog.js +37 -0
- package/dist/components/auth/AuthFormDialog.js.map +1 -0
- package/dist/components/auth/EmbeddedAuthForm.cjs +38 -0
- package/dist/components/auth/EmbeddedAuthForm.cjs.map +1 -0
- package/dist/components/auth/EmbeddedAuthForm.d.cts +5 -0
- package/dist/components/auth/EmbeddedAuthForm.d.ts +5 -0
- package/dist/components/auth/EmbeddedAuthForm.js +38 -0
- package/dist/components/auth/EmbeddedAuthForm.js.map +1 -0
- package/dist/components/auth/PasskeyPrompt.cjs +14 -0
- package/dist/components/auth/PasskeyPrompt.cjs.map +1 -0
- package/dist/components/auth/PasskeyPrompt.d.cts +15 -0
- package/dist/components/auth/PasskeyPrompt.d.ts +15 -0
- package/dist/components/auth/PasskeyPrompt.js +14 -0
- package/dist/components/auth/PasskeyPrompt.js.map +1 -0
- package/dist/components/auth/methods/email/EmailAuthFlow.cjs +37 -0
- package/dist/components/auth/methods/email/EmailAuthFlow.cjs.map +1 -0
- package/dist/components/auth/methods/email/EmailAuthFlow.d.cts +5 -0
- package/dist/components/auth/methods/email/EmailAuthFlow.d.ts +5 -0
- package/dist/components/auth/methods/email/EmailAuthFlow.js +37 -0
- package/dist/components/auth/methods/email/EmailAuthFlow.js.map +1 -0
- package/dist/components/auth/methods/email/EmailOTPInput.cjs +39 -0
- package/dist/components/auth/methods/email/EmailOTPInput.cjs.map +1 -0
- package/dist/components/auth/methods/email/EmailOTPInput.d.cts +10 -0
- package/dist/components/auth/methods/email/EmailOTPInput.d.ts +10 -0
- package/dist/components/auth/methods/email/EmailOTPInput.js +39 -0
- package/dist/components/auth/methods/email/EmailOTPInput.js.map +1 -0
- package/dist/components/auth/methods/email/EmailSignIn.cjs +37 -0
- package/dist/components/auth/methods/email/EmailSignIn.cjs.map +1 -0
- package/dist/components/auth/methods/email/EmailSignIn.d.cts +8 -0
- package/dist/components/auth/methods/email/EmailSignIn.d.ts +8 -0
- package/dist/components/auth/methods/email/EmailSignIn.js +37 -0
- package/dist/components/auth/methods/email/EmailSignIn.js.map +1 -0
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.cjs +37 -0
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.cjs.map +1 -0
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.d.cts +5 -0
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.d.ts +5 -0
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.js +37 -0
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.js.map +1 -0
- package/dist/components/auth/methods/google/GoogleSignIn.cjs +37 -0
- package/dist/components/auth/methods/google/GoogleSignIn.cjs.map +1 -0
- package/dist/components/auth/methods/google/GoogleSignIn.d.cts +6 -0
- package/dist/components/auth/methods/google/GoogleSignIn.d.ts +6 -0
- package/dist/components/auth/methods/google/GoogleSignIn.js +37 -0
- package/dist/components/auth/methods/google/GoogleSignIn.js.map +1 -0
- package/dist/components/auth/methods/web3/Web3AuthFlow.cjs +37 -0
- package/dist/components/auth/methods/web3/Web3AuthFlow.cjs.map +1 -0
- package/dist/components/auth/methods/web3/Web3AuthFlow.d.cts +5 -0
- package/dist/components/auth/methods/web3/Web3AuthFlow.d.ts +5 -0
- package/dist/components/auth/methods/web3/Web3AuthFlow.js +37 -0
- package/dist/components/auth/methods/web3/Web3AuthFlow.js.map +1 -0
- package/dist/components/auth/methods/web3/Web3AuthWrapper.cjs +37 -0
- package/dist/components/auth/methods/web3/Web3AuthWrapper.cjs.map +1 -0
- package/dist/components/auth/methods/web3/Web3AuthWrapper.d.cts +10 -0
- package/dist/components/auth/methods/web3/Web3AuthWrapper.d.ts +10 -0
- package/dist/components/auth/methods/web3/Web3AuthWrapper.js +37 -0
- package/dist/components/auth/methods/web3/Web3AuthWrapper.js.map +1 -0
- package/dist/components/auth/methods/web3/Web3ConnectButton.cjs +11 -0
- package/dist/components/auth/methods/web3/Web3ConnectButton.cjs.map +1 -0
- package/dist/components/auth/methods/web3/Web3ConnectButton.d.cts +13 -0
- package/dist/components/auth/methods/web3/Web3ConnectButton.d.ts +13 -0
- package/dist/components/auth/methods/web3/Web3ConnectButton.js +11 -0
- package/dist/components/auth/methods/web3/Web3ConnectButton.js.map +1 -0
- package/dist/components/auth/methods/web3/Web3Connectors.cjs +37 -0
- package/dist/components/auth/methods/web3/Web3Connectors.cjs.map +1 -0
- package/dist/components/auth/methods/web3/Web3Connectors.d.cts +5 -0
- package/dist/components/auth/methods/web3/Web3Connectors.d.ts +5 -0
- package/dist/components/auth/methods/web3/Web3Connectors.js +37 -0
- package/dist/components/auth/methods/web3/Web3Connectors.js.map +1 -0
- package/dist/components/auth/methods/web3/Web3ProviderButton.cjs +9 -0
- package/dist/components/auth/methods/web3/Web3ProviderButton.cjs.map +1 -0
- package/dist/components/auth/methods/web3/Web3ProviderButton.d.cts +11 -0
- package/dist/components/auth/methods/web3/Web3ProviderButton.d.ts +11 -0
- package/dist/components/auth/methods/web3/Web3ProviderButton.js +9 -0
- package/dist/components/auth/methods/web3/Web3ProviderButton.js.map +1 -0
- package/dist/components/auth/methods/web3/Web3SignIn.cjs +37 -0
- package/dist/components/auth/methods/web3/Web3SignIn.cjs.map +1 -0
- package/dist/components/auth/methods/web3/Web3SignIn.d.cts +5 -0
- package/dist/components/auth/methods/web3/Web3SignIn.d.ts +5 -0
- package/dist/components/auth/methods/web3/Web3SignIn.js +37 -0
- package/dist/components/auth/methods/web3/Web3SignIn.js.map +1 -0
- package/dist/components/common/Dialog.cjs +26 -0
- package/dist/components/common/Dialog.cjs.map +1 -0
- package/dist/components/common/Dialog.d.cts +26 -0
- package/dist/components/common/Dialog.d.ts +26 -0
- package/dist/components/common/Dialog.js +26 -0
- package/dist/components/common/Dialog.js.map +1 -0
- package/dist/components/common/Divider.cjs +37 -0
- package/dist/components/common/Divider.cjs.map +1 -0
- package/dist/components/common/Divider.d.cts +9 -0
- package/dist/components/common/Divider.d.ts +9 -0
- package/dist/components/common/Divider.js +37 -0
- package/dist/components/common/Divider.js.map +1 -0
- package/dist/components/common/InputOTP.cjs +14 -0
- package/dist/components/common/InputOTP.cjs.map +1 -0
- package/dist/components/common/InputOTP.d.cts +24 -0
- package/dist/components/common/InputOTP.d.ts +24 -0
- package/dist/components/common/InputOTP.js +14 -0
- package/dist/components/common/InputOTP.js.map +1 -0
- package/dist/components/common/PoweredByCrossmint.cjs +10 -0
- package/dist/components/common/PoweredByCrossmint.cjs.map +1 -0
- package/dist/components/common/PoweredByCrossmint.d.cts +8 -0
- package/dist/components/common/PoweredByCrossmint.d.ts +8 -0
- package/dist/components/common/PoweredByCrossmint.js +10 -0
- package/dist/components/common/PoweredByCrossmint.js.map +1 -0
- package/dist/components/common/Spinner.cjs +9 -0
- package/dist/components/common/Spinner.cjs.map +1 -0
- package/dist/components/common/Spinner.d.cts +9 -0
- package/dist/components/common/Spinner.d.ts +9 -0
- package/dist/components/common/Spinner.js +9 -0
- package/dist/components/common/Spinner.js.map +1 -0
- package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.cjs +8 -0
- package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.cjs.map +1 -0
- package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.d.cts +13 -0
- package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.d.ts +13 -0
- package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.js +8 -0
- package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.js.map +1 -0
- package/dist/components/embed/EmbeddedCheckoutIFrame.cjs +8 -0
- package/dist/components/embed/EmbeddedCheckoutIFrame.cjs.map +1 -0
- package/dist/components/embed/EmbeddedCheckoutIFrame.d.cts +9 -0
- package/dist/components/embed/EmbeddedCheckoutIFrame.d.ts +9 -0
- package/dist/components/embed/EmbeddedCheckoutIFrame.js +8 -0
- package/dist/components/embed/EmbeddedCheckoutIFrame.js.map +1 -0
- package/dist/components/embed/crypto/CryptoEmbeddedCheckout.cjs +11 -0
- package/dist/components/embed/crypto/CryptoEmbeddedCheckout.cjs.map +1 -0
- package/dist/components/embed/crypto/CryptoEmbeddedCheckout.d.cts +6 -0
- package/dist/components/embed/crypto/CryptoEmbeddedCheckout.d.ts +6 -0
- package/dist/components/embed/crypto/CryptoEmbeddedCheckout.js +11 -0
- package/dist/components/embed/crypto/CryptoEmbeddedCheckout.js.map +1 -0
- package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.cjs +10 -0
- package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.cjs.map +1 -0
- package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.d.cts +6 -0
- package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.d.ts +6 -0
- package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.js +10 -0
- package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.js.map +1 -0
- package/dist/components/embed/fiat/FiatEmbeddedCheckout.cjs +11 -0
- package/dist/components/embed/fiat/FiatEmbeddedCheckout.cjs.map +1 -0
- package/dist/components/embed/fiat/FiatEmbeddedCheckout.d.cts +6 -0
- package/dist/components/embed/fiat/FiatEmbeddedCheckout.d.ts +6 -0
- package/dist/components/embed/fiat/FiatEmbeddedCheckout.js +11 -0
- package/dist/components/embed/fiat/FiatEmbeddedCheckout.js.map +1 -0
- package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.cjs +10 -0
- package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.cjs.map +1 -0
- package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.d.cts +6 -0
- package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.d.ts +6 -0
- package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.js +10 -0
- package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.js.map +1 -0
- package/dist/components/embed/fiat/FiatPaymentElement_OLD.cjs +75 -0
- package/dist/components/embed/fiat/FiatPaymentElement_OLD.cjs.map +1 -0
- package/dist/components/embed/fiat/FiatPaymentElement_OLD.d.cts +6 -0
- package/dist/components/embed/fiat/FiatPaymentElement_OLD.d.ts +6 -0
- package/dist/components/embed/fiat/FiatPaymentElement_OLD.js +75 -0
- package/dist/components/embed/fiat/FiatPaymentElement_OLD.js.map +1 -0
- package/dist/components/embed/index.cjs +14 -0
- package/dist/components/embed/index.cjs.map +1 -0
- package/dist/components/embed/index.d.cts +6 -0
- package/dist/components/embed/index.d.ts +6 -0
- package/dist/components/embed/index.js +14 -0
- package/dist/components/embed/index.js.map +1 -0
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.cjs +44 -0
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.cjs.map +1 -0
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.d.cts +6 -0
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.d.ts +6 -0
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js +44 -0
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js.map +1 -0
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.cjs +43 -0
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.cjs.map +1 -0
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.d.cts +6 -0
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.d.ts +6 -0
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.js +43 -0
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.js.map +1 -0
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.cjs +12 -0
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.cjs.map +1 -0
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.d.cts +10 -0
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.d.ts +10 -0
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.js +12 -0
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.js.map +1 -0
- package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.cjs +8 -0
- package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.cjs.map +1 -0
- package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.d.cts +12 -0
- package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.d.ts +12 -0
- package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.js +8 -0
- package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.js.map +1 -0
- package/dist/components/embed/v3/crypto/utils/handleSendTransaction.cjs +10 -0
- package/dist/components/embed/v3/crypto/utils/handleSendTransaction.cjs.map +1 -0
- package/dist/components/embed/v3/crypto/utils/handleSendTransaction.d.cts +7 -0
- package/dist/components/embed/v3/crypto/utils/handleSendTransaction.d.ts +7 -0
- package/dist/components/embed/v3/crypto/utils/handleSendTransaction.js +10 -0
- package/dist/components/embed/v3/crypto/utils/handleSendTransaction.js.map +1 -0
- package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.cjs +8 -0
- package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.cjs.map +1 -0
- package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.d.cts +10 -0
- package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.d.ts +10 -0
- package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.js +8 -0
- package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.js.map +1 -0
- package/dist/components/embed/v3/index.cjs +45 -0
- package/dist/components/embed/v3/index.cjs.map +1 -0
- package/dist/components/embed/v3/index.d.cts +3 -0
- package/dist/components/embed/v3/index.d.ts +3 -0
- package/dist/components/embed/v3/index.js +45 -0
- package/dist/components/embed/v3/index.js.map +1 -0
- package/dist/components/hosted/CrossmintPayButton.cjs +11 -0
- package/dist/components/hosted/CrossmintPayButton.cjs.map +1 -0
- package/dist/components/hosted/CrossmintPayButton.d.cts +11 -0
- package/dist/components/hosted/CrossmintPayButton.d.ts +11 -0
- package/dist/components/hosted/CrossmintPayButton.js +11 -0
- package/dist/components/hosted/CrossmintPayButton.js.map +1 -0
- package/dist/components/hosted/index.cjs +12 -0
- package/dist/components/hosted/index.cjs.map +1 -0
- package/dist/components/hosted/index.d.cts +4 -0
- package/dist/components/hosted/index.d.ts +4 -0
- package/dist/components/hosted/index.js +12 -0
- package/dist/components/hosted/index.js.map +1 -0
- package/dist/components/hosted/styles.cjs +10 -0
- package/dist/components/hosted/styles.cjs.map +1 -0
- package/dist/components/hosted/styles.d.cts +11 -0
- package/dist/components/hosted/styles.d.ts +11 -0
- package/dist/components/hosted/styles.js +10 -0
- package/dist/components/hosted/styles.js.map +1 -0
- package/dist/components/index.cjs +75 -0
- package/dist/components/index.cjs.map +1 -0
- package/dist/components/index.d.cts +10 -0
- package/dist/components/index.d.ts +10 -0
- package/dist/components/index.js +75 -0
- package/dist/components/index.js.map +1 -0
- package/dist/consts/version.cjs +8 -0
- package/dist/consts/version.cjs.map +1 -0
- package/dist/consts/version.d.cts +3 -0
- package/dist/consts/version.d.ts +3 -0
- package/dist/consts/version.js +8 -0
- package/dist/consts/version.js.map +1 -0
- package/dist/hooks/index.cjs +49 -0
- package/dist/hooks/index.cjs.map +1 -0
- package/dist/hooks/index.d.cts +13 -0
- package/dist/hooks/index.d.ts +13 -0
- package/dist/hooks/index.js +49 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/useAuth.cjs +37 -0
- package/dist/hooks/useAuth.cjs.map +1 -0
- package/dist/hooks/useAuth.d.cts +11 -0
- package/dist/hooks/useAuth.d.ts +11 -0
- package/dist/hooks/useAuth.js +37 -0
- package/dist/hooks/useAuth.js.map +1 -0
- package/dist/hooks/useCrossmint.cjs +10 -0
- package/dist/hooks/useCrossmint.cjs.map +1 -0
- package/dist/hooks/useCrossmint.d.cts +14 -0
- package/dist/hooks/useCrossmint.d.ts +14 -0
- package/dist/hooks/useCrossmint.js +10 -0
- package/dist/hooks/useCrossmint.js.map +1 -0
- package/dist/hooks/useCrossmintAuth.cjs +37 -0
- package/dist/hooks/useCrossmintAuth.cjs.map +1 -0
- package/dist/hooks/useCrossmintAuth.d.cts +11 -0
- package/dist/hooks/useCrossmintAuth.d.ts +11 -0
- package/dist/hooks/useCrossmintAuth.js +37 -0
- package/dist/hooks/useCrossmintAuth.js.map +1 -0
- package/dist/hooks/useCrossmintCheckout.cjs +13 -0
- package/dist/hooks/useCrossmintCheckout.cjs.map +1 -0
- package/dist/hooks/useCrossmintCheckout.d.cts +14 -0
- package/dist/hooks/useCrossmintCheckout.d.ts +14 -0
- package/dist/hooks/useCrossmintCheckout.js +13 -0
- package/dist/hooks/useCrossmintCheckout.js.map +1 -0
- package/dist/hooks/useDeepEffect.cjs +8 -0
- package/dist/hooks/useDeepEffect.cjs.map +1 -0
- package/dist/hooks/useDeepEffect.d.cts +5 -0
- package/dist/hooks/useDeepEffect.d.ts +5 -0
- package/dist/hooks/useDeepEffect.js +8 -0
- package/dist/hooks/useDeepEffect.js.map +1 -0
- package/dist/hooks/useEnvironment.cjs +8 -0
- package/dist/hooks/useEnvironment.cjs.map +1 -0
- package/dist/hooks/useEnvironment.d.cts +5 -0
- package/dist/hooks/useEnvironment.d.ts +5 -0
- package/dist/hooks/useEnvironment.js +8 -0
- package/dist/hooks/useEnvironment.js.map +1 -0
- package/dist/hooks/useOAuthWindowListener.cjs +37 -0
- package/dist/hooks/useOAuthWindowListener.cjs.map +1 -0
- package/dist/hooks/useOAuthWindowListener.d.cts +8 -0
- package/dist/hooks/useOAuthWindowListener.d.ts +8 -0
- package/dist/hooks/useOAuthWindowListener.js +37 -0
- package/dist/hooks/useOAuthWindowListener.js.map +1 -0
- package/dist/hooks/useWallet.cjs +37 -0
- package/dist/hooks/useWallet.cjs.map +1 -0
- package/dist/hooks/useWallet.d.cts +18 -0
- package/dist/hooks/useWallet.d.ts +18 -0
- package/dist/hooks/useWallet.js +37 -0
- package/dist/hooks/useWallet.js.map +1 -0
- package/dist/icons/alert.cjs +8 -0
- package/dist/icons/alert.cjs.map +1 -0
- package/dist/icons/alert.d.cts +7 -0
- package/dist/icons/alert.d.ts +7 -0
- package/dist/icons/alert.js +8 -0
- package/dist/icons/alert.js.map +1 -0
- package/dist/icons/base64Icons.cjs +12 -0
- package/dist/icons/base64Icons.cjs.map +1 -0
- package/dist/icons/base64Icons.d.cts +5 -0
- package/dist/icons/base64Icons.d.ts +5 -0
- package/dist/icons/base64Icons.js +12 -0
- package/dist/icons/base64Icons.js.map +1 -0
- package/dist/icons/chevronRight.cjs +8 -0
- package/dist/icons/chevronRight.cjs.map +1 -0
- package/dist/icons/chevronRight.d.cts +9 -0
- package/dist/icons/chevronRight.d.ts +9 -0
- package/dist/icons/chevronRight.js +8 -0
- package/dist/icons/chevronRight.js.map +1 -0
- package/dist/icons/discord.cjs +29 -0
- package/dist/icons/discord.cjs.map +1 -0
- package/dist/icons/discord.d.cts +7 -0
- package/dist/icons/discord.d.ts +7 -0
- package/dist/icons/discord.js +29 -0
- package/dist/icons/discord.js.map +1 -0
- package/dist/icons/emailOTP.cjs +8 -0
- package/dist/icons/emailOTP.cjs.map +1 -0
- package/dist/icons/emailOTP.d.cts +9 -0
- package/dist/icons/emailOTP.d.ts +9 -0
- package/dist/icons/emailOTP.js +8 -0
- package/dist/icons/emailOTP.js.map +1 -0
- package/dist/icons/farcaster.cjs +8 -0
- package/dist/icons/farcaster.cjs.map +1 -0
- package/dist/icons/farcaster.d.cts +7 -0
- package/dist/icons/farcaster.d.ts +7 -0
- package/dist/icons/farcaster.js +8 -0
- package/dist/icons/farcaster.js.map +1 -0
- package/dist/icons/fingerprint.cjs +8 -0
- package/dist/icons/fingerprint.cjs.map +1 -0
- package/dist/icons/fingerprint.d.cts +5 -0
- package/dist/icons/fingerprint.d.ts +5 -0
- package/dist/icons/fingerprint.js +8 -0
- package/dist/icons/fingerprint.js.map +1 -0
- package/dist/icons/google.cjs +8 -0
- package/dist/icons/google.cjs.map +1 -0
- package/dist/icons/google.d.cts +7 -0
- package/dist/icons/google.d.ts +7 -0
- package/dist/icons/google.js +8 -0
- package/dist/icons/google.js.map +1 -0
- package/dist/icons/leftArrow.cjs +8 -0
- package/dist/icons/leftArrow.cjs.map +1 -0
- package/dist/icons/leftArrow.d.cts +8 -0
- package/dist/icons/leftArrow.d.ts +8 -0
- package/dist/icons/leftArrow.js +8 -0
- package/dist/icons/leftArrow.js.map +1 -0
- package/dist/icons/passkey.cjs +8 -0
- package/dist/icons/passkey.cjs.map +1 -0
- package/dist/icons/passkey.d.cts +5 -0
- package/dist/icons/passkey.d.ts +5 -0
- package/dist/icons/passkey.js +8 -0
- package/dist/icons/passkey.js.map +1 -0
- package/dist/icons/passkeyPromptLogo.cjs +8 -0
- package/dist/icons/passkeyPromptLogo.cjs.map +1 -0
- package/dist/icons/passkeyPromptLogo.d.cts +8 -0
- package/dist/icons/passkeyPromptLogo.d.ts +8 -0
- package/dist/icons/passkeyPromptLogo.js +8 -0
- package/dist/icons/passkeyPromptLogo.js.map +1 -0
- package/dist/icons/poweredByLeaf.cjs +8 -0
- package/dist/icons/poweredByLeaf.cjs.map +1 -0
- package/dist/icons/poweredByLeaf.d.cts +7 -0
- package/dist/icons/poweredByLeaf.d.ts +7 -0
- package/dist/icons/poweredByLeaf.js +8 -0
- package/dist/icons/poweredByLeaf.js.map +1 -0
- package/dist/icons/wallet.cjs +8 -0
- package/dist/icons/wallet.cjs.map +1 -0
- package/dist/icons/wallet.d.cts +9 -0
- package/dist/icons/wallet.d.ts +9 -0
- package/dist/icons/wallet.js +8 -0
- package/dist/icons/wallet.js.map +1 -0
- package/dist/icons/x.cjs +29 -0
- package/dist/icons/x.cjs.map +1 -0
- package/dist/icons/x.d.cts +7 -0
- package/dist/icons/x.d.ts +7 -0
- package/dist/icons/x.js +29 -0
- package/dist/icons/x.js.map +1 -0
- package/dist/index.cjs +131 -1
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +17 -124
- package/dist/index.d.ts +17 -124
- package/dist/index.js +131 -1
- package/dist/index.js.map +1 -0
- package/dist/providers/CrossmintAuthProvider.cjs +39 -0
- package/dist/providers/CrossmintAuthProvider.cjs.map +1 -0
- package/dist/providers/CrossmintAuthProvider.d.cts +37 -0
- package/dist/providers/CrossmintAuthProvider.d.ts +37 -0
- package/dist/providers/CrossmintAuthProvider.js +39 -0
- package/dist/providers/CrossmintAuthProvider.js.map +1 -0
- package/dist/providers/CrossmintWalletProvider.cjs +39 -0
- package/dist/providers/CrossmintWalletProvider.cjs.map +1 -0
- package/dist/providers/CrossmintWalletProvider.d.cts +30 -0
- package/dist/providers/CrossmintWalletProvider.d.ts +30 -0
- package/dist/providers/CrossmintWalletProvider.js +39 -0
- package/dist/providers/CrossmintWalletProvider.js.map +1 -0
- package/dist/providers/TwindProvider.cjs +9 -0
- package/dist/providers/TwindProvider.cjs.map +1 -0
- package/dist/providers/TwindProvider.d.cts +8 -0
- package/dist/providers/TwindProvider.d.ts +8 -0
- package/dist/providers/TwindProvider.js +9 -0
- package/dist/providers/TwindProvider.js.map +1 -0
- package/dist/providers/auth/AuthFormProvider.cjs +39 -0
- package/dist/providers/auth/AuthFormProvider.cjs.map +1 -0
- package/dist/providers/auth/AuthFormProvider.d.cts +34 -0
- package/dist/providers/auth/AuthFormProvider.d.ts +34 -0
- package/dist/providers/auth/AuthFormProvider.js +39 -0
- package/dist/providers/auth/AuthFormProvider.js.map +1 -0
- package/dist/providers/auth/FarcasterProvider.cjs +8 -0
- package/dist/providers/auth/FarcasterProvider.cjs.map +1 -0
- package/dist/providers/auth/FarcasterProvider.d.cts +9 -0
- package/dist/providers/auth/FarcasterProvider.d.ts +9 -0
- package/dist/providers/auth/FarcasterProvider.js +8 -0
- package/dist/providers/auth/FarcasterProvider.js.map +1 -0
- package/dist/providers/auth/web3/WagmiAuthProvider.cjs +8 -0
- package/dist/providers/auth/web3/WagmiAuthProvider.cjs.map +1 -0
- package/dist/providers/auth/web3/WagmiAuthProvider.d.cts +8 -0
- package/dist/providers/auth/web3/WagmiAuthProvider.d.ts +8 -0
- package/dist/providers/auth/web3/WagmiAuthProvider.js +8 -0
- package/dist/providers/auth/web3/WagmiAuthProvider.js.map +1 -0
- package/dist/providers/index.cjs +43 -0
- package/dist/providers/index.cjs.map +1 -0
- package/dist/providers/index.d.cts +8 -0
- package/dist/providers/index.d.ts +8 -0
- package/dist/providers/index.js +43 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/testUtils.cjs +8 -0
- package/dist/testUtils.cjs.map +1 -0
- package/dist/testUtils.d.cts +3 -0
- package/dist/testUtils.d.ts +3 -0
- package/dist/testUtils.js +8 -0
- package/dist/testUtils.js.map +1 -0
- package/dist/twind.config.cjs +8 -0
- package/dist/twind.config.cjs.map +1 -0
- package/dist/twind.config.d.cts +8 -0
- package/dist/twind.config.d.ts +8 -0
- package/dist/twind.config.js +8 -0
- package/dist/twind.config.js.map +1 -0
- package/dist/types/auth.cjs +1 -0
- package/dist/types/auth.cjs.map +1 -0
- package/dist/types/auth.d.cts +6 -0
- package/dist/types/auth.d.ts +6 -0
- package/dist/types/auth.js +1 -0
- package/dist/types/auth.js.map +1 -0
- package/dist/utils/classNames.cjs +8 -0
- package/dist/utils/classNames.cjs.map +1 -0
- package/dist/utils/classNames.d.cts +11 -0
- package/dist/utils/classNames.d.ts +11 -0
- package/dist/utils/classNames.js +8 -0
- package/dist/utils/classNames.js.map +1 -0
- package/dist/utils/createCrossmintApiClient.cjs +9 -0
- package/dist/utils/createCrossmintApiClient.cjs.map +1 -0
- package/dist/utils/createCrossmintApiClient.d.cts +5 -0
- package/dist/utils/createCrossmintApiClient.d.ts +5 -0
- package/dist/utils/createCrossmintApiClient.js +9 -0
- package/dist/utils/createCrossmintApiClient.js.map +1 -0
- package/package.json +20 -14
- package/src/components/auth/AuthForm.tsx +10 -5
- package/src/components/auth/AuthFormBackButton.tsx +1 -5
- package/src/components/auth/AuthFormDialog.tsx +7 -2
- package/src/components/auth/methods/email/EmailOTPInput.tsx +13 -14
- package/src/components/auth/methods/email/EmailSignIn.tsx +15 -19
- package/src/components/auth/methods/farcaster/FarcasterSignIn.tsx +10 -14
- package/src/components/auth/methods/google/GoogleSignIn.tsx +7 -16
- package/src/components/auth/methods/web3/Web3AuthFlow.tsx +17 -0
- package/src/components/auth/methods/web3/Web3AuthWrapper.tsx +87 -0
- package/src/components/auth/methods/web3/Web3ConnectButton.tsx +62 -0
- package/src/components/auth/methods/web3/Web3Connectors.tsx +91 -0
- package/src/components/auth/methods/web3/Web3ProviderButton.tsx +38 -0
- package/src/components/auth/methods/web3/Web3SignIn.tsx +41 -0
- package/src/components/common/Dialog.tsx +10 -29
- package/src/components/common/Divider.tsx +1 -1
- package/src/components/common/InputOTP.tsx +9 -4
- package/src/components/common/PoweredByCrossmint.tsx +3 -10
- package/src/components/embed/v3/EmbeddedCheckoutV3IFrame.tsx +3 -1
- package/src/hooks/index.ts +0 -1
- package/src/hooks/useAuth.ts +2 -2
- package/src/hooks/useCrossmint.test.tsx +4 -33
- package/src/hooks/useCrossmint.tsx +1 -12
- package/src/hooks/useCrossmintAuth.ts +12 -0
- package/src/hooks/useCrossmintCheckout.tsx +7 -5
- package/src/hooks/useOAuthWindowListener.ts +4 -10
- package/src/icons/base64Icons.ts +8 -0
- package/src/icons/chevronRight.tsx +21 -0
- package/src/icons/poweredByLeaf.tsx +81 -80
- package/src/icons/wallet.tsx +23 -0
- package/src/index.ts +0 -8
- package/src/providers/CrossmintAuthProvider.test.tsx +72 -87
- package/src/providers/CrossmintAuthProvider.tsx +83 -77
- package/src/providers/CrossmintWalletProvider.test.tsx +15 -9
- package/src/providers/TwindProvider.tsx +14 -0
- package/src/providers/auth/AuthFormProvider.test.tsx +61 -19
- package/src/providers/auth/AuthFormProvider.tsx +52 -60
- package/src/providers/auth/web3/WagmiAuthProvider.tsx +56 -0
- package/src/testUtils.ts +0 -4
- package/src/twind.config.ts +12 -5
- package/src/hooks/useAuthSignIn.ts +0 -117
- package/src/hooks/useRefreshToken.test.ts +0 -155
- package/src/hooks/useRefreshToken.ts +0 -68
- package/src/utils/authCookies.test.ts +0 -41
- package/src/utils/authCookies.ts +0 -13
|
@@ -1,19 +1,28 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
1
2
|
import { render, fireEvent, waitFor } from "@testing-library/react";
|
|
3
|
+
import { beforeEach } from "vitest";
|
|
2
4
|
import { AuthFormProvider, useAuthForm } from "./AuthFormProvider";
|
|
3
|
-
import { describe, expect,
|
|
4
|
-
import type { LoginMethod } from "..";
|
|
5
|
+
import { describe, expect, it, vi } from "vitest";
|
|
6
|
+
import type { CrossmintAuthWalletConfig, LoginMethod } from "..";
|
|
7
|
+
import { useCrossmintAuth } from "@/hooks/useCrossmintAuth";
|
|
8
|
+
|
|
9
|
+
vi.mock("./web3/WagmiAuthProvider", () => ({
|
|
10
|
+
WagmiAuthProvider: ({ children }: { children: ReactNode }) => <>{children}</>,
|
|
11
|
+
}));
|
|
12
|
+
|
|
13
|
+
vi.mock("@/hooks/useCrossmintAuth");
|
|
5
14
|
|
|
6
15
|
// Mock component to test the AuthFormProvider
|
|
7
16
|
function TestComponent() {
|
|
8
|
-
const { step,
|
|
17
|
+
const { step, baseUrl, loginMethods, setStep, setDialogOpen, oauthUrlMap, isLoadingOauthUrlMap, appearance } =
|
|
9
18
|
useAuthForm();
|
|
10
19
|
|
|
11
20
|
return (
|
|
12
21
|
<div>
|
|
13
22
|
<div data-testid="step">{step}</div>
|
|
14
|
-
<div data-testid="api-key">{apiKey}</div>
|
|
15
23
|
<div data-testid="base-url">{baseUrl}</div>
|
|
16
24
|
<div data-testid="login-methods">{JSON.stringify(loginMethods)}</div>
|
|
25
|
+
<div data-testid="appearance">{JSON.stringify(appearance)}</div>
|
|
17
26
|
<button onClick={() => setStep("otp")} data-testid="set-step">
|
|
18
27
|
Set Step to OTP
|
|
19
28
|
</button>
|
|
@@ -27,24 +36,35 @@ function TestComponent() {
|
|
|
27
36
|
}
|
|
28
37
|
|
|
29
38
|
describe("AuthFormProvider", () => {
|
|
30
|
-
const mockFetchAuthMaterial = vi.fn().mockResolvedValue({});
|
|
31
39
|
const mockInitialState = {
|
|
32
|
-
apiKey: "test-api-key",
|
|
33
40
|
baseUrl: "https://api.example.com",
|
|
34
|
-
|
|
35
|
-
loginMethods: ["email", "google"] as LoginMethod[],
|
|
41
|
+
loginMethods: ["email", "google", "farcaster", "web3"] as LoginMethod[],
|
|
36
42
|
setDialogOpen: vi.fn(),
|
|
43
|
+
embeddedWallets: {
|
|
44
|
+
createOnLogin: "off",
|
|
45
|
+
defaultChain: "base-sepolia",
|
|
46
|
+
type: "evm-smart-wallet",
|
|
47
|
+
} as CrossmintAuthWalletConfig,
|
|
48
|
+
appearance: {
|
|
49
|
+
colors: {
|
|
50
|
+
textPrimary: "#000000",
|
|
51
|
+
textSecondary: "#A4AFB2",
|
|
52
|
+
},
|
|
53
|
+
},
|
|
37
54
|
};
|
|
55
|
+
const mockedGetOAuthUrl = vi.fn();
|
|
38
56
|
|
|
39
57
|
beforeEach(() => {
|
|
40
58
|
vi.resetAllMocks();
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
59
|
+
|
|
60
|
+
vi.mocked(useCrossmintAuth).mockReturnValue({
|
|
61
|
+
crossmintAuth: {
|
|
62
|
+
getOAuthUrl: mockedGetOAuthUrl.mockResolvedValue("https://oauth.example.com"),
|
|
63
|
+
},
|
|
64
|
+
} as any);
|
|
45
65
|
});
|
|
46
66
|
|
|
47
|
-
|
|
67
|
+
it("provides initial context values and fetches OAuth URLs", async () => {
|
|
48
68
|
const { getByTestId } = render(
|
|
49
69
|
<AuthFormProvider initialState={mockInitialState}>
|
|
50
70
|
<TestComponent />
|
|
@@ -52,9 +72,11 @@ describe("AuthFormProvider", () => {
|
|
|
52
72
|
);
|
|
53
73
|
|
|
54
74
|
expect(getByTestId("step").textContent).toBe("initial");
|
|
55
|
-
expect(getByTestId("api-key").textContent).toBe("test-api-key");
|
|
56
75
|
expect(getByTestId("base-url").textContent).toBe("https://api.example.com");
|
|
57
|
-
expect(getByTestId("login-methods").textContent).toBe('["email","google"]');
|
|
76
|
+
expect(getByTestId("login-methods").textContent).toBe('["email","google","farcaster","web3"]');
|
|
77
|
+
expect(getByTestId("appearance").textContent).toBe(
|
|
78
|
+
'{"colors":{"textPrimary":"#000000","textSecondary":"#A4AFB2"}}'
|
|
79
|
+
);
|
|
58
80
|
|
|
59
81
|
await waitFor(() => {
|
|
60
82
|
expect(getByTestId("oauth-url").textContent).toBe('{"google":"https://oauth.example.com"}');
|
|
@@ -62,7 +84,7 @@ describe("AuthFormProvider", () => {
|
|
|
62
84
|
});
|
|
63
85
|
});
|
|
64
86
|
|
|
65
|
-
|
|
87
|
+
it("updates step", () => {
|
|
66
88
|
const { getByTestId } = render(
|
|
67
89
|
<AuthFormProvider initialState={mockInitialState}>
|
|
68
90
|
<TestComponent />
|
|
@@ -73,7 +95,7 @@ describe("AuthFormProvider", () => {
|
|
|
73
95
|
expect(getByTestId("step").textContent).toBe("otp");
|
|
74
96
|
});
|
|
75
97
|
|
|
76
|
-
|
|
98
|
+
it("calls setDialogOpen", () => {
|
|
77
99
|
const { getByTestId } = render(
|
|
78
100
|
<AuthFormProvider initialState={mockInitialState}>
|
|
79
101
|
<TestComponent />
|
|
@@ -84,8 +106,8 @@ describe("AuthFormProvider", () => {
|
|
|
84
106
|
expect(mockInitialState.setDialogOpen).toHaveBeenCalledWith(true);
|
|
85
107
|
});
|
|
86
108
|
|
|
87
|
-
|
|
88
|
-
|
|
109
|
+
it("handles OAuth URL fetch error", async () => {
|
|
110
|
+
vi.mocked(mockedGetOAuthUrl).mockRejectedValue(new Error("Fetch failed"));
|
|
89
111
|
const consoleSpy = vi.spyOn(console, "error").mockImplementation(() => {});
|
|
90
112
|
|
|
91
113
|
const { getByTestId } = render(
|
|
@@ -102,4 +124,24 @@ describe("AuthFormProvider", () => {
|
|
|
102
124
|
expect(consoleSpy).toHaveBeenCalled();
|
|
103
125
|
consoleSpy.mockRestore();
|
|
104
126
|
});
|
|
127
|
+
|
|
128
|
+
test("throws error when web3 login method is used with createOnLogin=all-users", () => {
|
|
129
|
+
const invalidState = {
|
|
130
|
+
...mockInitialState,
|
|
131
|
+
loginMethods: ["web3"] as LoginMethod[],
|
|
132
|
+
embeddedWallets: {
|
|
133
|
+
createOnLogin: "all-users",
|
|
134
|
+
defaultChain: "base-sepolia",
|
|
135
|
+
type: "evm-smart-wallet",
|
|
136
|
+
} as CrossmintAuthWalletConfig,
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
expect(() =>
|
|
140
|
+
render(
|
|
141
|
+
<AuthFormProvider initialState={invalidState}>
|
|
142
|
+
<TestComponent />
|
|
143
|
+
</AuthFormProvider>
|
|
144
|
+
)
|
|
145
|
+
).toThrowError("Creating wallets on login is not yet supported for web3 login method");
|
|
146
|
+
});
|
|
105
147
|
});
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { createContext, useContext, useEffect, useState, type ReactNode } from "react";
|
|
2
|
-
import type {
|
|
1
|
+
import { createContext, useCallback, useContext, useEffect, useState, type ReactNode } from "react";
|
|
2
|
+
import type { OAuthProvider } from "@crossmint/common-sdk-auth";
|
|
3
3
|
import type { UIConfig } from "@crossmint/common-sdk-base";
|
|
4
|
-
import type { LoginMethod } from "../CrossmintAuthProvider";
|
|
4
|
+
import type { CrossmintAuthWalletConfig, LoginMethod } from "../CrossmintAuthProvider";
|
|
5
|
+
import { useCrossmintAuth } from "@/hooks/useCrossmintAuth";
|
|
6
|
+
import { WagmiAuthProvider } from "./web3/WagmiAuthProvider";
|
|
7
|
+
|
|
8
|
+
type AuthStep = "initial" | "otp" | "qrCode" | "web3" | "web3/metamask" | "web3/walletconnect";
|
|
5
9
|
|
|
6
|
-
type AuthStep = "initial" | "walletMethod" | "otp" | "qrCode";
|
|
7
10
|
type OAuthUrlMap = Record<OAuthProvider, string>;
|
|
8
11
|
const initialOAuthUrlMap: OAuthUrlMap = {
|
|
9
12
|
google: "",
|
|
@@ -11,24 +14,21 @@ const initialOAuthUrlMap: OAuthUrlMap = {
|
|
|
11
14
|
};
|
|
12
15
|
interface AuthFormContextType {
|
|
13
16
|
step: AuthStep;
|
|
14
|
-
apiKey: string;
|
|
15
|
-
baseUrl: string;
|
|
16
|
-
fetchAuthMaterial: (refreshToken: string) => Promise<AuthMaterialWithUser>;
|
|
17
17
|
appearance?: UIConfig;
|
|
18
18
|
loginMethods: LoginMethod[];
|
|
19
19
|
oauthUrlMap: OAuthUrlMap;
|
|
20
20
|
isLoadingOauthUrlMap: boolean;
|
|
21
|
+
baseUrl: string;
|
|
21
22
|
setStep: (step: AuthStep) => void;
|
|
22
23
|
setDialogOpen: (open: boolean) => void;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
type ContextInitialStateProps = {
|
|
26
|
-
apiKey: string;
|
|
27
|
-
baseUrl: string;
|
|
28
|
-
fetchAuthMaterial: (refreshToken: string) => Promise<AuthMaterialWithUser>;
|
|
29
27
|
appearance?: UIConfig;
|
|
30
28
|
loginMethods: LoginMethod[];
|
|
29
|
+
baseUrl: string;
|
|
31
30
|
setDialogOpen?: (open: boolean) => void;
|
|
31
|
+
embeddedWallets: CrossmintAuthWalletConfig;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
const AuthFormContext = createContext<AuthFormContextType | undefined>(undefined);
|
|
@@ -45,72 +45,64 @@ export const AuthFormProvider = ({
|
|
|
45
45
|
children,
|
|
46
46
|
initialState,
|
|
47
47
|
}: { children: ReactNode; initialState: ContextInitialStateProps }) => {
|
|
48
|
+
const { crossmintAuth } = useCrossmintAuth();
|
|
48
49
|
const [step, setStep] = useState<AuthStep>("initial");
|
|
49
50
|
const [oauthUrlMap, setOauthUrlMap] = useState<OAuthUrlMap>(initialOAuthUrlMap);
|
|
50
51
|
const [isLoadingOauthUrlMap, setIsLoadingOauthUrlMap] = useState(true);
|
|
51
52
|
|
|
52
|
-
const { loginMethods,
|
|
53
|
+
const { loginMethods, baseUrl, setDialogOpen, appearance, embeddedWallets } = initialState;
|
|
53
54
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
if (loginMethods.includes("web3") && embeddedWallets?.createOnLogin === "all-users") {
|
|
56
|
+
throw new Error("Creating wallets on login is not yet supported for web3 login method");
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const preFetchAndSetOauthUrl = useCallback(async () => {
|
|
60
|
+
setIsLoadingOauthUrlMap(true);
|
|
61
|
+
try {
|
|
62
|
+
const oauthProviders = loginMethods.filter(
|
|
63
|
+
(method): method is OAuthProvider => method in initialOAuthUrlMap
|
|
64
|
+
);
|
|
61
65
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
const oauthPromiseList = oauthProviders.map(async (provider) => {
|
|
67
|
+
const url = await crossmintAuth?.getOAuthUrl(provider);
|
|
68
|
+
return { [provider]: url };
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
const oauthUrlMap = Object.assign({}, ...(await Promise.all(oauthPromiseList)));
|
|
72
|
+
setOauthUrlMap(oauthUrlMap);
|
|
73
|
+
} catch (error) {
|
|
74
|
+
console.error("Error fetching OAuth URLs:", error);
|
|
75
|
+
} finally {
|
|
76
|
+
setIsLoadingOauthUrlMap(false);
|
|
77
|
+
}
|
|
78
|
+
}, [loginMethods, crossmintAuth]);
|
|
66
79
|
|
|
67
|
-
|
|
68
|
-
setOauthUrlMap(oauthUrlMap);
|
|
69
|
-
} catch (error) {
|
|
70
|
-
console.error("Error fetching OAuth URLs:", error);
|
|
71
|
-
} finally {
|
|
72
|
-
setIsLoadingOauthUrlMap(false);
|
|
73
|
-
}
|
|
74
|
-
};
|
|
80
|
+
useEffect(() => {
|
|
75
81
|
preFetchAndSetOauthUrl();
|
|
76
|
-
}, [
|
|
82
|
+
}, [preFetchAndSetOauthUrl]);
|
|
83
|
+
|
|
84
|
+
const handleToggleDialog = (open: boolean) => {
|
|
85
|
+
setDialogOpen?.(open);
|
|
86
|
+
if (!open) {
|
|
87
|
+
// Delay to allow the close transition to complete before resetting the step
|
|
88
|
+
setTimeout(() => setStep("initial"), 250);
|
|
89
|
+
}
|
|
90
|
+
};
|
|
77
91
|
|
|
78
92
|
const value: AuthFormContextType = {
|
|
79
93
|
step,
|
|
80
|
-
apiKey,
|
|
81
94
|
baseUrl,
|
|
82
|
-
|
|
83
|
-
appearance: initialState.appearance,
|
|
95
|
+
appearance,
|
|
84
96
|
loginMethods,
|
|
85
97
|
oauthUrlMap,
|
|
86
98
|
isLoadingOauthUrlMap,
|
|
87
|
-
setDialogOpen:
|
|
99
|
+
setDialogOpen: handleToggleDialog,
|
|
88
100
|
setStep,
|
|
89
101
|
};
|
|
90
102
|
|
|
91
|
-
return
|
|
103
|
+
return (
|
|
104
|
+
<AuthFormContext.Provider value={value}>
|
|
105
|
+
<WagmiAuthProvider>{children}</WagmiAuthProvider>
|
|
106
|
+
</AuthFormContext.Provider>
|
|
107
|
+
);
|
|
92
108
|
};
|
|
93
|
-
|
|
94
|
-
async function getOAuthUrl(provider: OAuthProvider, options: { baseUrl: string; apiKey: string }) {
|
|
95
|
-
try {
|
|
96
|
-
const queryParams = new URLSearchParams({ apiKey: options.apiKey });
|
|
97
|
-
const response = await fetch(
|
|
98
|
-
`${options.baseUrl}api/2024-09-26/session/sdk/auth/social/${provider}/start?${queryParams}`,
|
|
99
|
-
{
|
|
100
|
-
headers: {
|
|
101
|
-
"x-api-key": options.apiKey,
|
|
102
|
-
},
|
|
103
|
-
}
|
|
104
|
-
);
|
|
105
|
-
|
|
106
|
-
if (!response.ok) {
|
|
107
|
-
throw new Error("Failed to get OAuth URL. Please try again or contact support.");
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
const data = (await response.json()) as { oauthUrl: string };
|
|
111
|
-
return data.oauthUrl;
|
|
112
|
-
} catch (error) {
|
|
113
|
-
console.error(`Error fetching OAuth URL for ${provider}:`, error);
|
|
114
|
-
throw new Error(`Failed to get OAuth URL for ${provider}. Please try again or contact support.`);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import { createConfig, http, WagmiProvider } from "wagmi";
|
|
3
|
+
import {
|
|
4
|
+
arbitrum,
|
|
5
|
+
arbitrumSepolia,
|
|
6
|
+
base,
|
|
7
|
+
baseSepolia,
|
|
8
|
+
optimism,
|
|
9
|
+
optimismSepolia,
|
|
10
|
+
polygon,
|
|
11
|
+
polygonAmoy,
|
|
12
|
+
mainnet,
|
|
13
|
+
} from "wagmi/chains";
|
|
14
|
+
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
15
|
+
import { metaMask, walletConnect } from "wagmi/connectors";
|
|
16
|
+
|
|
17
|
+
const ALCHEMY_API_KEY = "-7M6vRDBDknwvMxnqah_jbcieWg0qad9";
|
|
18
|
+
const ALCHEMY_RPC_SUBDOMAIN = {
|
|
19
|
+
mainnet: "mainnet",
|
|
20
|
+
polygon: "polygon-mainnet",
|
|
21
|
+
"polygon-amoy": "polygon-amoy",
|
|
22
|
+
base: "base-mainnet",
|
|
23
|
+
"base-sepolia": "base-sepolia",
|
|
24
|
+
optimism: "opt-mainnet",
|
|
25
|
+
"optimism-sepolia": "opt-sepolia",
|
|
26
|
+
arbitrum: "arb-mainnet",
|
|
27
|
+
"arbitrum-sepolia": "arb-sepolia",
|
|
28
|
+
};
|
|
29
|
+
function getAlchemyRPC(chain: keyof typeof ALCHEMY_RPC_SUBDOMAIN): string {
|
|
30
|
+
return `https://${ALCHEMY_RPC_SUBDOMAIN[chain]}.g.alchemy.com/v2/${ALCHEMY_API_KEY}`;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const config = createConfig({
|
|
34
|
+
chains: [mainnet, base, polygon, optimism, arbitrum, baseSepolia, polygonAmoy, optimismSepolia, arbitrumSepolia],
|
|
35
|
+
connectors: [metaMask(), walletConnect({ projectId: "94ed8f7549329dad7be968888eec3688" })],
|
|
36
|
+
transports: {
|
|
37
|
+
[mainnet.id]: http(getAlchemyRPC("mainnet")),
|
|
38
|
+
[base.id]: http(getAlchemyRPC("base")),
|
|
39
|
+
[polygon.id]: http(getAlchemyRPC("polygon")),
|
|
40
|
+
[optimism.id]: http(getAlchemyRPC("optimism")),
|
|
41
|
+
[arbitrum.id]: http(getAlchemyRPC("arbitrum")),
|
|
42
|
+
[baseSepolia.id]: http(getAlchemyRPC("base-sepolia")),
|
|
43
|
+
[polygonAmoy.id]: http(getAlchemyRPC("polygon-amoy")),
|
|
44
|
+
[optimismSepolia.id]: http(getAlchemyRPC("optimism-sepolia")),
|
|
45
|
+
[arbitrumSepolia.id]: http(getAlchemyRPC("arbitrum-sepolia")),
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export function WagmiAuthProvider({ children }: { children: React.ReactNode }) {
|
|
50
|
+
const queryClient = new QueryClient();
|
|
51
|
+
return (
|
|
52
|
+
<WagmiProvider config={config}>
|
|
53
|
+
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
|
|
54
|
+
</WagmiProvider>
|
|
55
|
+
);
|
|
56
|
+
}
|
package/src/testUtils.ts
CHANGED
package/src/twind.config.ts
CHANGED
|
@@ -4,9 +4,6 @@ import presetTailwind from "@twind/preset-tailwind";
|
|
|
4
4
|
export default defineConfig({
|
|
5
5
|
presets: [presetTailwind()],
|
|
6
6
|
theme: {
|
|
7
|
-
screens: {
|
|
8
|
-
xs: "480px",
|
|
9
|
-
},
|
|
10
7
|
extend: {
|
|
11
8
|
colors: {
|
|
12
9
|
// Crossmint colors (cm- prefix)
|
|
@@ -14,8 +11,10 @@ export default defineConfig({
|
|
|
14
11
|
"cm-text-secondary": "#67797F",
|
|
15
12
|
"cm-background-primary": "#FFFFFF",
|
|
16
13
|
"cm-muted-primary": "#F0F2F4",
|
|
14
|
+
"cm-hover": "#E9ECF0",
|
|
17
15
|
"cm-border": "#D9D9D9",
|
|
18
|
-
"cm-
|
|
16
|
+
"cm-link": "#1A73E8",
|
|
17
|
+
"cm-accent": "#04AA6D",
|
|
19
18
|
},
|
|
20
19
|
keyframes: {
|
|
21
20
|
"caret-blink": {
|
|
@@ -94,7 +93,7 @@ export default defineConfig({
|
|
|
94
93
|
},
|
|
95
94
|
rules: [
|
|
96
95
|
[
|
|
97
|
-
"responsive-border-radius-auth-dialog",
|
|
96
|
+
"cm-responsive-border-radius-auth-dialog",
|
|
98
97
|
{
|
|
99
98
|
"@media (max-width: 479px)": {
|
|
100
99
|
"border-bottom-left-radius": "0 !important",
|
|
@@ -102,6 +101,14 @@ export default defineConfig({
|
|
|
102
101
|
},
|
|
103
102
|
},
|
|
104
103
|
],
|
|
104
|
+
[
|
|
105
|
+
"focus-ring-custom",
|
|
106
|
+
{
|
|
107
|
+
"&:focus": {
|
|
108
|
+
"box-shadow": "0 0 0 3px var(--focus-ring-color)",
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
],
|
|
105
112
|
],
|
|
106
113
|
/* config */
|
|
107
114
|
});
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import type { UseSignInData } from "@farcaster/auth-kit";
|
|
2
|
-
|
|
3
|
-
export function useAuthSignIn() {
|
|
4
|
-
return {
|
|
5
|
-
onEmailSignIn,
|
|
6
|
-
onConfirmEmailOtp,
|
|
7
|
-
onFarcasterSignIn,
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
async function onEmailSignIn(email: string, options: { baseUrl: string; apiKey: string }) {
|
|
12
|
-
try {
|
|
13
|
-
const queryParams = new URLSearchParams({ apiKey: options.apiKey });
|
|
14
|
-
const response = await fetch(`${options.baseUrl}api/2024-09-26/session/sdk/auth/otps/send?${queryParams}`, {
|
|
15
|
-
headers: {
|
|
16
|
-
"Content-Type": "application/json",
|
|
17
|
-
"x-api-key": options.apiKey,
|
|
18
|
-
},
|
|
19
|
-
credentials: "same-origin",
|
|
20
|
-
cache: "no-cache",
|
|
21
|
-
mode: "cors",
|
|
22
|
-
method: "POST",
|
|
23
|
-
body: JSON.stringify({ email }),
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
if (!response?.ok) {
|
|
27
|
-
throw new Error("Failed to send email. Please try again or contact support.");
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return await response.json();
|
|
31
|
-
} catch (err) {
|
|
32
|
-
console.error("Error signing in via email ", err);
|
|
33
|
-
throw new Error("Error signing in via email " + err);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
async function onConfirmEmailOtp(
|
|
38
|
-
email: string,
|
|
39
|
-
emailId: string,
|
|
40
|
-
token: string,
|
|
41
|
-
options: { baseUrl: string; apiKey: string }
|
|
42
|
-
) {
|
|
43
|
-
try {
|
|
44
|
-
const queryParams = new URLSearchParams({
|
|
45
|
-
email,
|
|
46
|
-
signinAuthenticationMethod: "email",
|
|
47
|
-
apiKey: options.apiKey,
|
|
48
|
-
token,
|
|
49
|
-
locale: "en",
|
|
50
|
-
state: emailId,
|
|
51
|
-
callbackUrl: `${options.baseUrl}api/2024-09-26/session/sdk/auth/we-dont-actually-use-this-anymore`,
|
|
52
|
-
});
|
|
53
|
-
const response = await fetch(`${options.baseUrl}api/2024-09-26/session/sdk/auth/authenticate?${queryParams}`, {
|
|
54
|
-
headers: {
|
|
55
|
-
"Content-Type": "application/json",
|
|
56
|
-
"x-api-key": options.apiKey,
|
|
57
|
-
},
|
|
58
|
-
credentials: "same-origin",
|
|
59
|
-
cache: "no-cache",
|
|
60
|
-
mode: "cors",
|
|
61
|
-
method: "POST",
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
if (!response?.ok) {
|
|
65
|
-
throw new Error("Failed to confirm email otp. Please try again or contact support.");
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const data = await response.json();
|
|
69
|
-
const callbackUrl = new URL(data.callbackUrl);
|
|
70
|
-
|
|
71
|
-
// parse the oneTimeSecret from the callbackUrl response
|
|
72
|
-
return callbackUrl.searchParams.get("oneTimeSecret");
|
|
73
|
-
} catch (err) {
|
|
74
|
-
console.error("Error confirming email otp ", err);
|
|
75
|
-
throw new Error("Error confirming email otp " + err);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
async function onFarcasterSignIn(data: UseSignInData, options: { baseUrl: string; apiKey: string }) {
|
|
80
|
-
try {
|
|
81
|
-
const queryParams = new URLSearchParams({
|
|
82
|
-
signinAuthenticationMethod: "farcaster",
|
|
83
|
-
apiKey: options.apiKey,
|
|
84
|
-
callbackUrl: `${options.baseUrl}sdk/2024-09-26/auth/callback?isPopup=false`,
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
const response = await fetch(`${options.baseUrl}api/2024-09-26/session/sdk/auth/authenticate?${queryParams}`, {
|
|
88
|
-
headers: {
|
|
89
|
-
"Content-Type": "application/json",
|
|
90
|
-
"x-api-key": options.apiKey,
|
|
91
|
-
},
|
|
92
|
-
body: JSON.stringify({
|
|
93
|
-
...data,
|
|
94
|
-
domain: data.signatureParams.domain,
|
|
95
|
-
redirect: true,
|
|
96
|
-
callbackUrl: `${options.baseUrl}sdk/2024-09-26/auth/callback?isPopup=false`,
|
|
97
|
-
}),
|
|
98
|
-
credentials: "same-origin",
|
|
99
|
-
cache: "no-cache",
|
|
100
|
-
mode: "cors",
|
|
101
|
-
method: "POST",
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
if (!response?.ok) {
|
|
105
|
-
throw new Error("Failed to sign in via farcaster. Please try again or contact support.");
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
const resData = await response.json();
|
|
109
|
-
const callbackUrl = new URL(resData.callbackUrl);
|
|
110
|
-
|
|
111
|
-
// parse the oneTimeSecret from the callbackUrl response
|
|
112
|
-
return callbackUrl.searchParams.get("oneTimeSecret");
|
|
113
|
-
} catch (err) {
|
|
114
|
-
console.error("Error signing in via farcaster ", err);
|
|
115
|
-
throw new Error("Error signing in via farcaster " + err);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import { act, renderHook } from "@testing-library/react";
|
|
2
|
-
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
3
|
-
|
|
4
|
-
import type { AuthMaterialWithUser } from "@crossmint/common-sdk-auth";
|
|
5
|
-
import { type CrossmintAuthService, getJWTExpiration } from "@crossmint/client-sdk-auth";
|
|
6
|
-
import { queueTask } from "@crossmint/client-sdk-base";
|
|
7
|
-
|
|
8
|
-
import * as authCookies from "../utils/authCookies";
|
|
9
|
-
import { useRefreshToken } from "./useRefreshToken";
|
|
10
|
-
|
|
11
|
-
vi.mock("@crossmint/client-sdk-auth", () => ({
|
|
12
|
-
CrossmintAuthService: vi.fn(),
|
|
13
|
-
getJWTExpiration: vi.fn(),
|
|
14
|
-
}));
|
|
15
|
-
|
|
16
|
-
vi.mock("../utils/authCookies", () => ({
|
|
17
|
-
getCookie: vi.fn(),
|
|
18
|
-
REFRESH_TOKEN_PREFIX: "crossmint-refresh-token",
|
|
19
|
-
}));
|
|
20
|
-
|
|
21
|
-
vi.mock("@crossmint/client-sdk-base", async () => {
|
|
22
|
-
const actual = await vi.importActual("@crossmint/client-sdk-base");
|
|
23
|
-
return {
|
|
24
|
-
...actual,
|
|
25
|
-
queueTask: vi.fn(),
|
|
26
|
-
};
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
describe("useRefreshToken", () => {
|
|
30
|
-
const mockCrossmintAuthService = {
|
|
31
|
-
refreshAuthMaterial: vi.fn(),
|
|
32
|
-
} as unknown as CrossmintAuthService;
|
|
33
|
-
|
|
34
|
-
const mockSetAuthMaterial = vi.fn();
|
|
35
|
-
|
|
36
|
-
beforeEach(() => {
|
|
37
|
-
vi.useFakeTimers();
|
|
38
|
-
vi.spyOn(console, "error").mockImplementation(() => {});
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
afterEach(() => {
|
|
42
|
-
vi.restoreAllMocks();
|
|
43
|
-
vi.useRealTimers();
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
it("should not refresh token if refresh token is not present", async () => {
|
|
47
|
-
vi.mocked(authCookies.getCookie).mockReturnValue(undefined);
|
|
48
|
-
|
|
49
|
-
renderHook(() =>
|
|
50
|
-
useRefreshToken({
|
|
51
|
-
crossmintAuthService: mockCrossmintAuthService,
|
|
52
|
-
setAuthMaterial: mockSetAuthMaterial,
|
|
53
|
-
logout: vi.fn(),
|
|
54
|
-
})
|
|
55
|
-
);
|
|
56
|
-
|
|
57
|
-
await act(async () => {
|
|
58
|
-
await vi.runAllTimersAsync();
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
expect(mockCrossmintAuthService.refreshAuthMaterial).not.toHaveBeenCalled();
|
|
62
|
-
expect(mockSetAuthMaterial).not.toHaveBeenCalled();
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
it("should refresh token if refresh token is present", async () => {
|
|
66
|
-
const mockRefreshToken = "mock-refresh-token";
|
|
67
|
-
const mockAuthMaterial: AuthMaterialWithUser = {
|
|
68
|
-
jwt: "mock-jwt-token",
|
|
69
|
-
refreshToken: {
|
|
70
|
-
secret: "mock-secret",
|
|
71
|
-
expiresAt: "2023-04-01T00:00:00Z",
|
|
72
|
-
},
|
|
73
|
-
user: {
|
|
74
|
-
id: "123",
|
|
75
|
-
email: "test@test.com",
|
|
76
|
-
},
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
vi.mocked(authCookies.getCookie).mockReturnValue(mockRefreshToken);
|
|
80
|
-
vi.mocked(mockCrossmintAuthService.refreshAuthMaterial).mockResolvedValue(mockAuthMaterial);
|
|
81
|
-
vi.mocked(getJWTExpiration).mockReturnValue(Date.now() / 1000 + 3600); // 1 hour from now
|
|
82
|
-
|
|
83
|
-
renderHook(() =>
|
|
84
|
-
useRefreshToken({
|
|
85
|
-
crossmintAuthService: mockCrossmintAuthService,
|
|
86
|
-
setAuthMaterial: mockSetAuthMaterial,
|
|
87
|
-
logout: vi.fn(),
|
|
88
|
-
})
|
|
89
|
-
);
|
|
90
|
-
|
|
91
|
-
await act(async () => {
|
|
92
|
-
await vi.runAllTimersAsync();
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
expect(mockCrossmintAuthService.refreshAuthMaterial).toHaveBeenCalledWith(mockRefreshToken);
|
|
96
|
-
expect(mockSetAuthMaterial).toHaveBeenCalledWith(mockAuthMaterial);
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
it("should schedule next refresh before token expiration", async () => {
|
|
100
|
-
const mockRefreshToken = "mock-refresh-token";
|
|
101
|
-
const mockAuthMaterial: AuthMaterialWithUser = {
|
|
102
|
-
jwt: "mock-jwt-token",
|
|
103
|
-
refreshToken: {
|
|
104
|
-
secret: "mock-secret",
|
|
105
|
-
expiresAt: "2023-04-01T00:00:00Z",
|
|
106
|
-
},
|
|
107
|
-
user: {
|
|
108
|
-
id: "123",
|
|
109
|
-
email: "test@test.com",
|
|
110
|
-
},
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
vi.mocked(authCookies.getCookie).mockReturnValue(mockRefreshToken);
|
|
114
|
-
vi.mocked(mockCrossmintAuthService.refreshAuthMaterial).mockResolvedValue(mockAuthMaterial);
|
|
115
|
-
vi.mocked(getJWTExpiration).mockReturnValue(Date.now() / 1000 + 3600); // 1 hour from now
|
|
116
|
-
|
|
117
|
-
renderHook(() =>
|
|
118
|
-
useRefreshToken({
|
|
119
|
-
crossmintAuthService: mockCrossmintAuthService,
|
|
120
|
-
setAuthMaterial: mockSetAuthMaterial,
|
|
121
|
-
logout: vi.fn(),
|
|
122
|
-
})
|
|
123
|
-
);
|
|
124
|
-
|
|
125
|
-
await act(async () => {
|
|
126
|
-
await vi.runAllTimersAsync();
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
expect(vi.mocked(queueTask)).toHaveBeenCalledTimes(1);
|
|
130
|
-
expect(vi.mocked(queueTask)).toHaveBeenCalledWith(expect.any(Function), expect.any(Number));
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
it("should handle errors during token refresh", async () => {
|
|
134
|
-
const mockRefreshToken = "mock-refresh-token";
|
|
135
|
-
const mockError = new Error("Refresh failed");
|
|
136
|
-
|
|
137
|
-
vi.mocked(authCookies.getCookie).mockReturnValue(mockRefreshToken);
|
|
138
|
-
vi.mocked(mockCrossmintAuthService.refreshAuthMaterial).mockRejectedValue(mockError);
|
|
139
|
-
|
|
140
|
-
renderHook(() =>
|
|
141
|
-
useRefreshToken({
|
|
142
|
-
crossmintAuthService: mockCrossmintAuthService,
|
|
143
|
-
setAuthMaterial: mockSetAuthMaterial,
|
|
144
|
-
logout: vi.fn(),
|
|
145
|
-
})
|
|
146
|
-
);
|
|
147
|
-
|
|
148
|
-
await act(async () => {
|
|
149
|
-
await vi.runAllTimersAsync();
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
expect(console.error).toHaveBeenCalledWith(mockError);
|
|
153
|
-
expect(mockSetAuthMaterial).not.toHaveBeenCalled();
|
|
154
|
-
});
|
|
155
|
-
});
|