Skip to content

feat: cloud auth email capture flow#4449

Merged
zoruka merged 48 commits intomainfrom
feat/email-capture-flow
Jul 22, 2025
Merged

feat: cloud auth email capture flow#4449
zoruka merged 48 commits intomainfrom
feat/email-capture-flow

Conversation

@zoruka
Copy link
Copy Markdown
Contributor

@zoruka zoruka commented Jun 2, 2025

Description

Main Purpose: Adds optional email collection functionality to the authentication flow with OTP verification.

Key Changes:

  1. New UI Components:

    • Data capture views for email collection
    • Email OTP confirmation widget
    • Email suffixes widget (for autocomplete)
    • Recent emails widget (shows previously used emails)
  2. Router & Navigation:

    • Added DataCapture and DataCaptureOtpConfirm states to the router
    • New navigation flows for email capture and OTP verification
  3. Configuration & Feature Flags:

    • Added emailCapture feature flag to configuration
    • Added enableCloudAuthAccount option to frame provider
    • Updated default features and remote features
  4. Storage & Data Management:

    • Added @appkit/recent_emails storage key for persisting recent emails
    • Enhanced authentication service with OTP request/confirmation methods
  5. Testing & Quality:

    • Comprehensive unit tests for all new components
    • Mock implementations for testing email capture flows
  6. Dependencies:

    • Added @reown/appkit-siwx as optional dependency
    • Updated various package exports and peer dependencies

Impact: This feature allows applications to optionally collect user emails during the authentication process, with proper OTP verification and user-friendly UI components for email management.

Type of change

  • Chore (non-breaking change that addresses non-functional tasks, maintenance, or code quality improvements)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Associated Issues

For Linear issues: Closes APKT-xxx
For GH issues: closes #...

Showcase (Optional)

If there is a UI change include the screenshots with before and after state.
If new feature is being introduced, include the link to demo recording.

Checklist

  • Code in this PR is covered by automated tests (Unit tests, E2E tests)
  • My changes generate no new warnings
  • I have reviewed my own code
  • I have filled out all required sections
  • I have tested my changes on the preview link
  • Approver of this PR confirms that the changes are tested on the preview link

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jun 2, 2025

🦋 Changeset detected

Latest commit: 52abad0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 23 packages
Name Type
@reown/appkit-adapter-bitcoin Patch
@reown/appkit-adapter-ethers5 Patch
@reown/appkit-adapter-ethers Patch
@reown/appkit-adapter-solana Patch
@reown/appkit-adapter-wagmi Patch
@reown/appkit-wallet-button Patch
@reown/appkit-utils Patch
@reown/appkit-experimental Patch
@reown/appkit-controllers Patch
@reown/appkit-core Patch
@reown/appkit-scaffold-ui Patch
@reown/appkit-polyfills Patch
@reown/appkit-codemod Patch
@reown/appkit-testing Patch
@reown/appkit Patch
@reown/appkit-common Patch
@reown/appkit-wallet Patch
@reown/appkit-siwe Patch
@reown/appkit-siwx Patch
@reown/appkit-cdn Patch
@reown/appkit-cli Patch
@reown/appkit-pay Patch
@reown/appkit-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown

vercel bot commented Jun 2, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
appkit-basic-html ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 22, 2025 2:41pm
appkit-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 22, 2025 2:41pm
appkit-gallery ✅ Ready (Inspect) Visit Preview Jul 22, 2025 2:41pm
appkit-laboratory ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 22, 2025 2:41pm
10 Skipped Deployments
Name Status Preview Comments Updated (UTC)
appkit-basic-example ⬜️ Ignored (Inspect) Jul 22, 2025 2:41pm
appkit-basic-sign-client-example ⬜️ Ignored (Inspect) Jul 22, 2025 2:41pm
appkit-basic-up-example ⬜️ Ignored (Inspect) Visit Preview Jul 22, 2025 2:41pm
appkit-ethers5-bera ⬜️ Ignored (Inspect) Jul 22, 2025 2:41pm
appkit-nansen-demo ⬜️ Ignored (Inspect) Jul 22, 2025 2:41pm
appkit-vue-solana ⬜️ Ignored (Inspect) Jul 22, 2025 2:41pm
appkit-wagmi-cdn-example ⬜️ Ignored (Inspect) Jul 22, 2025 2:41pm
ethereum-provider-wagmi-example ⬜️ Ignored (Inspect) Jul 22, 2025 2:41pm
next-wagmi-solana-bitcoin-example ⬜️ Ignored (Inspect) Jul 22, 2025 2:41pm
vue-wagmi-example ⬜️ Ignored (Inspect) Jul 22, 2025 2:41pm

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: Async Method Call Without Error Handling

The firstUpdated() method calls the async this.onSubmit() without awaiting it or handling potential errors. This can lead to unhandled promise rejections if onSubmit() throws an error, such as when the account is not connected.

packages/siwx/src/ui/w3m-data-capture-view/index.ts#L46-L54

public override firstUpdated() {
this.loading = false
this.recentEmails = this.getRecentEmails()
if (this.email) {
this.onSubmit()
}
}

Fix in CursorFix in Web


Was this report helpful? Give feedback by reacting with 👍 or 👎

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.

3 participants