Skip to content

Commit df0388d

Browse files
feat: expose auth options on useConnectModal (#5004)
1 parent 9685a85 commit df0388d

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.changeset/blue-seahorses-compare.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Expose auth options on `useConnectModal`

packages/thirdweb/src/react/web/ui/ConnectWallet/useConnectModal.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type { Wallet } from "../../../../wallets/interfaces/wallet.js";
55
import type { SmartWalletOptions } from "../../../../wallets/smart/types.js";
66
import type { AppMetadata } from "../../../../wallets/types.js";
77
import type { Theme } from "../../../core/design-system/index.js";
8+
import type { SiweAuthOptions } from "../../../core/hooks/auth/useSiweAuth.js";
89
import { SetRootElementContext } from "../../../core/providers/RootElementContext.js";
910
import { WalletUIStatesProvider } from "../../providers/wallet-ui-states-provider.js";
1011
import { canFitWideModal } from "../../utils/canFitWideModal.js";
@@ -432,4 +433,14 @@ export type UseConnectModalOptions = {
432433
* If you want to hide the branding, set this prop to `false`
433434
*/
434435
showThirdwebBranding?: boolean;
436+
437+
/**
438+
* Enable SIWE (Sign in with Ethererum) by passing an object of type `SiweAuthOptions` to
439+
* enforce the users to sign a message after connecting their wallet to authenticate themselves.
440+
*
441+
* Refer to the [`SiweAuthOptions`](https://portal.thirdweb.com/references/typescript/v5/SiweAuthOptions) for more details
442+
*/
443+
auth?: SiweAuthOptions;
435444
};
445+
446+
// TODO: consilidate Button/Embed/Modal props into one type with extras

0 commit comments

Comments
 (0)