Skip to content

Commit

Permalink
Merge branch 'main' into iyk/update-otp-expo-example
Browse files Browse the repository at this point in the history
  • Loading branch information
iykazrji authored Dec 20, 2024
2 parents 4cbfa9b + 9f750d7 commit dec3edc
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
4 changes: 4 additions & 0 deletions site/pages/react/react-hooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ description: How to embed our authentication into your customized UI

If you don't want to use our pre-built UI components, you can build your own custom UI using the [`useAuthenticate`](/reference/account-kit/react/hooks/useAuthenticate) hook.

:::tip
Tailwind CSS is a required dependency for using Alchemy Account Kit UI components. However, Alchemy Account Kit hooks function independently and do not require Tailwind.
:::

### Email authentication

```tsx twoslash
Expand Down
4 changes: 4 additions & 0 deletions site/pages/react/ui-components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Account Kit allows you to use pre-built, [highly customizable](https://demo.alch
- customize [authentication method ui](#customize-authentication-ui)
- customize [theme](/react/customization/theme)

:::tip
Tailwind CSS is a required dependency for using Alchemy Account Kit UI components. However, Alchemy Account Kit hooks function independently and do not require Tailwind.
:::

## Modal auth

Assuming your application has been [set up](/react/quickstart), using UI components is the easiest way to authenticate users. All you have to do is leverage the [`useAuthModal`](/reference/account-kit/react/hooks/useAuthModal) hook and provide users a CTA to open the modal.
Expand Down
30 changes: 29 additions & 1 deletion site/pages/signer/export-private-key.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,35 @@ description: Learn how to enable a user to export their private key with the Alc

The Alchemy Signer allows you to export a user's private key, allowing them a right to exit at any time. It is considered a best practice to allow your users to export their private key, as it gives them full control over their account. The private key export method does not rely on Alchemy's infrastructure, so even if Alchemy is down, a user can still export their private key.

## Usage
## Using [useExportAccount](/reference/account-kit/react/hooks/useExportAccount)

A hook use to export the private key for an account. It returns the mutation functions to kick off the export process, as well as a component to render the account recovery details in an iframe.

### Import

```ts
import { useExportAccount } from "@account-kit/react";
```

### Usage

```ts
import { useExportAccount } from "@account-kit/react";

const {
exportAccount,
isExported,
isExporting,
error,
ExportAccountComponent,
} = useExportAccount({
params: {
iframeContainerId: "my-iframe-container",
},
});
```

## Using the signer

To add export private key functionality to your app, you can use the `exportPrivateKey` method on the signer.

Expand Down

0 comments on commit dec3edc

Please sign in to comment.