Skip to content

Conversation

@tom2drum
Copy link
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

@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
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

2 participants