Skip to content

Smart wallet auth#3220

Merged
tom2drum merged 27 commits intomainfrom
tom2drum/issue-3159
Feb 18, 2026
Merged

Smart wallet auth#3220
tom2drum merged 27 commits intomainfrom
tom2drum/issue-3159

Conversation

@tom2drum
Copy link
Copy Markdown
Collaborator

@tom2drum tom2drum commented Jan 9, 2026

Description and Related Issue(s)

Resolves #3159

This PR implements smart wallet authentication using Dynamic (WaaS - Wallet as a Service) as an alternative to the existing Auth0-based authentication. The implementation allows users to authenticate using their connected wallet through Dynamic's smart wallet infrastructure, providing a seamless Web3 authentication experience.

The changes include integration of Dynamic SDK, refactoring of user profile components to support multiple auth providers, dynamic imports for web3 wallet packages to optimize bundle size, and updates to the wallet connection flow to work with smart wallets. The implementation maintains backward compatibility with the existing Auth0 authentication while adding the new Dynamic provider as an option.

Proposed Changes

  • Smart wallet authentication integration: Added Dynamic (WaaS) provider support for user authentication using connected wallets
  • Auth provider abstraction: Refactored user profile components to support multiple authentication providers (Auth0 and Dynamic)
  • Dynamic imports: Implemented code splitting for web3 wallet packages to reduce initial bundle size
  • Wallet connection improvements: Enhanced wallet connection flow to support smart wallets and improved reconnection handling
  • User profile refactoring: Reorganized user profile components into separate directories for auth0 and dynamic providers, with shared common utilities

Environment Variables

  • NEXT_PUBLIC_ACCOUNT_AUTH_PROVIDER: Selects the authentication provider (auth0 or dynamic) for basic user authentication. Defaults to auth0 for backward compatibility
  • NEXT_PUBLIC_ACCOUNT_DYNAMIC_ENVIRONMENT_ID: Environment ID of the Dynamic project, required when using dynamic as the auth provider
  • NEXT_PUBLIC_RE_CAPTCHA_APP_SITE_KEY: Updated to be required only when using auth0 as the provider (previously always required)

Breaking or Incompatible Changes

No breaking changes. The implementation maintains full backward compatibility with existing Auth0 authentication. The new Dynamic provider is opt-in via environment variable configuration.

Additional Information

This implementation is part of the WaaS pilot program. More details can be found in the related Notion document referenced in issue #3159.

Checklist for PR author

  • I have tested these changes locally.
  • I added tests to cover any new functionality, following this guide
  • Whenever I fix a bug, I include a regression test to ensure that the bug does not reappear silently.
  • If I have added a feature or functionality that is not privacy-compliant (e.g., tracking, analytics, third-party services), I have disabled it for private mode.
  • If I have added, changed, renamed, or removed an environment variable
    • I updated the list of environment variables in the documentation
    • I made the necessary changes to the validator script according to the guide
    • I added "ENVs" label to this pull request

Note

High Risk
Touches core authentication and wallet-connection flows and introduces a new third-party provider path (Dynamic) plus top-level-await-based code splitting, which could impact login/connectivity and runtime bundling if misconfigured.

Overview
Adds an opt-in Dynamic (WaaS) authentication + wallet connector path alongside the existing Auth0/Reown setup, controlled by new envs (NEXT_PUBLIC_ACCOUNT_AUTH_PROVIDER, NEXT_PUBLIC_ACCOUNT_DYNAMIC_ENVIRONMENT_ID) and a new account.authProvider/blockchainInteraction.connectorType feature payload.

Refactors web3/auth plumbing to switch providers via top-level await import(...) code-splitting: introduces Web3Provider that selects ReownProvider vs DynamicProvider, adds Dynamic-specific useWallet/useAccount hooks, updates CSP to be connector-aware, and adjusts UI entry points (profile button, auth guards, email-linking, address verification) to route through Auth0 vs Dynamic. Also adds a general:auth_dynamic API resource, manual gas estimation for Dynamic contract writes, disables rewards when using Dynamic, and updates build/test configs (higher Node memory, enable top-level await, TS target ES2017, browser sourcemaps off, Playwright CT env bootstrap).

Written by Cursor Bugbot for commit 98666c4. This will update automatically on new commits. Configure here.

@tom2drum tom2drum added dependencies Pull requests that update a dependency file ENVs labels Jan 9, 2026
@tom2drum tom2drum marked this pull request as ready for review January 21, 2026 19:12
@tom2drum tom2drum requested a review from isstuev January 21, 2026 19:13
@tom2drum
Copy link
Copy Markdown
Collaborator Author

bugbot run

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.

Cursor Bugbot has reviewed your changes and found 4 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@tom2drum tom2drum merged commit 737ee4c into main Feb 18, 2026
12 checks passed
@tom2drum tom2drum deleted the tom2drum/issue-3159 branch February 18, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file ENVs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Smart wallet auth

1 participant