Skip to content

Add Openfort as a third-party signer#1140

Open
emauja wants to merge 2 commits intoalchemyplatform:mainfrom
emauja:add-openfort-signer
Open

Add Openfort as a third-party signer#1140
emauja wants to merge 2 commits intoalchemyplatform:mainfrom
emauja:add-openfort-signer

Conversation

@emauja
Copy link

@emauja emauja commented Mar 18, 2026

Summary

  • Adds a new documentation page for using Openfort's embedded wallet as a signer with Alchemy Smart Wallets
  • Follows the same structure as the existing Privy integration guide with React and JavaScript tabs
  • Updates sidebar navigation (docs.yml) to include the Openfort page under Third-party signers
  • Adds Openfort to the integrations list in the custom-integration page

Details

The new page covers:

  • Installing @openfort/openfort-js alongside @alchemy/wallet-apis
  • Initializing Openfort with publishable key and Shield configuration
  • Creating a React context/provider for Openfort state management
  • Getting an EIP-1193 provider from Openfort and wrapping it as a viem WalletClient
  • Authentication flow using Openfort's email OTP
  • Passing the Openfort signer to createSmartWalletClient for Smart Wallet transactions

Test plan

  • Verify the new page renders correctly at /docs/wallets/third-party/signers/openfort
  • Verify sidebar navigation shows Openfort under Third-party signers
  • Verify code examples are syntactically correct
  • Verify links to Openfort dashboard and documentation are valid

🤖 Generated with Claude Code

Add documentation for using Openfort's embedded wallet as a signer with
Alchemy Smart Wallets. Follows the same structure as the existing Privy
integration guide with React and JavaScript tabs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@emauja emauja requested a review from a team as a code owner March 18, 2026 22:02
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7abdd8bf64

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +143 to +144
getSigner();
}, [openfort, signer]);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Retry signer initialization when auth state changes

If useOpenfortSigner mounts before the user finishes the Openfort login flow, getEthereumProvider() can return nothing and leave signer unset. Because this effect only depends on openfort and signer, it never reruns when the embedded wallet state later flips to READY, so the example can get stuck showing "Loading signer..." after a successful login. Include auth/readiness state in the dependency chain or reset the signer when login state changes.

Useful? React with 👍 / 👎.

Comment on lines +299 to +303
// Authenticate the user (e.g., via email OTP)
await openfort.auth.requestEmailOTP({ email: "user@example.com" });
// await openfort.auth.verifyEmailOTP({ email, code });

// Get the EIP-1193 provider from Openfort

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Verify the OTP before using the embedded wallet

requestEmailOTP() only sends the one-time code; it does not authenticate the user. In this JavaScript sample the next lines immediately call getEthereumProvider() and eth_requestAccounts, so anyone following the email-OTP flow verbatim will try to use the signer before a session exists and the transaction example cannot succeed. The verification step (or a different completed auth flow) needs to happen before accessing the provider.

Useful? React with 👍 / 👎.

…rt-js

The React tab was incorrectly using @openfort/openfort-js with a manually
built React context. Now uses the proper @openfort/react SDK with:
- OpenfortProvider + wagmi + React Query provider setup
- useUser, useUI, useSignOut hooks for authentication
- useWalletClient from wagmi for signer access
- getDefaultConfig for wagmi configuration

The JavaScript tab remains unchanged, correctly using @openfort/openfort-js
with its imperative/class-based API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant