SFA Flutter SDK and Smart Accounts

When asking for help in this category, please make sure to provide the following details:

  • SDK Version: 7.0.0
  • Platform: Android & iOS
  • Browser Console Screenshots:
  • If the issue is related to Custom Authentication, please include the following information (optional):
    • Verifier Name:
    • JWKS Endpoint:
    • Sample idToken (JWT):

Also, kindly provide the Web3Auth initialization and login code snippet below. This will help us better understand your issue and provide you with the necessary assistance.

Future<void> _initializeSingleFactorAuth() async {
    try {
      debugPrint('Starting Web3Auth Single Factor Auth initialization...');

      // Get Web3Auth client ID from configuration
      final clientId = AppConfig.web3AuthClientId;
      debugPrint('SFA client ID: ${clientId.substring(0, 8)}...');

      if (clientId.isEmpty) {
        debugPrint('Web3Auth client ID is empty, aborting initialization');
        isSFAInitialized.value = false;
        return;
      }

      // Determine network based on environment
      Web3AuthNetwork network;
      switch (AppConfig.web3AuthNetworkConfig) {
        case 'mainnet':
          network = Web3AuthNetwork.sapphire_mainnet;
          break;
        case 'testnet':
        default:
          network = Web3AuthNetwork.sapphire_devnet;
          break;
      }
      debugPrint('Using SFA network: $network');

      // Prepare smart account configuration if enabled
      _buildSmartAccountConfig();

      // Initialize SFA with proper configuration including smart accounts
      debugPrint(
        'Calling SingleFactorAuth.init() with smart account config...',
      );
      await _singleFactorAuth.init(
        Web3AuthOptions(
          //accountAbstractionConfig: smartAccountConfig,
          clientId: clientId,
          network: network,
          sessionTime: 86400, // 24 hours
          // Note: accountAbstractionConfig may need to be added when the package supports it
          // For now, we'll handle smart account logic in our service layer
        ),
      );
      debugPrint('SingleFactorAuth.init() completed successfully');

      isSFAInitialized.value = true;
      debugPrint('SFA initialization completed successfully');

      // Check if user has an existing session
      await _checkExistingSession();
    } catch (e) {
      debugPrint('SFA initialization failed: $e');
      isSFAInitialized.value = false;

      // Only throw if it's a real initialization error, not a session error
      if (e.toString().contains('No user found') ||
          e.toString().contains('No session found')) {
        debugPrint(
          'No existing session found - this is expected for new users',
        );
        isWalletReady.value = false;
      } else {
        throw Exception('Failed to initialize Single Factor Auth: $e');
      }
    }
  }


We need to setup Smart Accounts in our wallet using flutter SFA, we are connecting successfully to web3auth but Web3AuthOptions in the SFA package doesn’t allow for “accountAbstractionConfig” and the documentation for Smart Accounts doesn’t cover Flutter. Are Smart Accounts supported in Flutter SFA?

Thank you in advance.

Thank you for providing a detailed description, code snippet, and your context. Here’s a summary of your query for the support team:


Issue Summary

  • SDK: SFA Flutter SDK
  • SDK Version: 7.0.0
  • Platform: Android & iOS
  • Initialization Code Provided: Yes (see above)
  • Issue: You want to enable Smart Accounts (Account Abstraction) in your wallet using the Flutter SFA SDK. However, the Web3AuthOptions in the SFA Flutter package does not expose the accountAbstractionConfig parameter, and the documentation does not mention Flutter support for Smart Accounts.
  • Question: Are Smart Accounts (Account Abstraction) currently supported in the SFA Flutter SDK? If not, is there a roadmap or workaround?

Additional Notes

  • You are able to connect to Web3Auth successfully.
  • You have attempted to prepare a smart account config, but cannot pass it to the SDK due to missing support in the options interface.
  • You referenced documentation for other platforms (Web/React/Vue) where accountAbstractionConfig is available, but this is not the case for Flutter.

Proposed Solution / Current Status

Based on the official documentation for SFA Flutter SDK, as of now, Smart Accounts (Account Abstraction) are not yet supported in the SFA Flutter SDK. The accountAbstractionConfig parameter is available in Web and some other SDKs, but not in Flutter at this time.

  • Documentation Reference: Web3Auth Flutter SFA SDK Docs
  • Smart Accounts Overview: Smart Accounts Docs
  • Current Limitations: The documentation and current SDK implementation do not mention Flutter support for Smart Accounts or Account Abstraction configuration.

Next Steps / Action Items

  • For the Support Team: Please confirm if there is a planned release or workaround for enabling Smart Accounts in the SFA Flutter SDK, or if there’s any beta/experimental support available.
  • For Sergio: If you have any additional requirements or constraints, please share them here so the team can provide the most relevant guidance.

Thank you for your clear and detailed question! The support team will follow up with the latest information or roadmap details. If you have any more context or requirements, feel free to add them.

Note: This response was generated by an AI bot and may require further verification. The Web3Auth support team has tracked this issue and will be responding as soon as possible.

Additionally, we would recommend you to join our biweekly Office Hours to get this resolved even faster. Web3Auth Developer Office Hours