Skip to main content
Version: Next

Overview

The Account Linking feature on Flow enables developers to provide seamless onboarding and in-app experiences while simultaneously empowering users with real ownership and self-sovereignty. With this new custodial model, developers can deliver the benefits of both app and self-custody in a unified experience.

The full user experience is enabled by three core components:

  • Walletless Onboarding - App managed account creation, funding, and custody
  • Account Linking - App custodied accounts may delegate access to users wallet
  • Core HybridCustody contract - A standard contract enabling users to view and manage their linked accounts

User Journey

  1. The app creates, funds, and manages access to a Flow account initialized on user onboarding. This enables the app to abstract away the complexities of interacting with smart contract powered applications, and focus on creating slick user experiences behind familiar Web2 authentication and fiat denominated payments.
  2. Once a user returns to the app with a self-custodial wallet, they can authenticate their wallet-managed account in the app, allowing the app to give the user's main account delegated access to the app managed account (albeit with some developer-defined restrictions).
  3. Upon linking, the user's main account - now the "parent" account - adds the app created account - now the "child" account - to a collection of all linked child accounts. At this point, Hybrid Custody is reached!

See it in Action

info

Experience the magic of Account Linking in the arcade demo yourself here!

Why Care?

Account Linking grants users access to their linked child accounts without needing to interface with the child account's custodial app, and the custodial app can interact with the relevant assets in the child account on behalf of the user in a frictionless UX free from transaction prompts.

tip

All assets in the app account can now jump the walled garden to play in the rest of the Flow ecosystem. No transactions are needed to move assets from the child account to the parent account, as the parent account already has full access to the assets in the child account.

This shared control over the digital items in the in-app account enables users to establish real ownership of the items beyond the context of the app, where they can use their self-custody wallet to view inventory, take the items to other apps in the ecosystem, such as a marketplace or a game.

Most importantly, users are able to do this without the need to transfer the digital items between accounts, making it seamless to continue using the original app while also using other apps.

With account linking, developers can build walletless onboarding experiences for new users that provide a clear path to self-custody. Continue on to read our guides for more details on how you can use Account Linking to build spectacular experiences on Flow.

Guides

  • Building Walletless Applications Using Child Accounts covers how apps can leverage Account Linking to create a seamless user experience and enable future self-custody.
  • Working With Parent Accounts covers features enabled by the core HybridCustody contract to access child account assets from parent accounts. This is useful for apps like marketplaces or wallets that are working with accounts that have potential child accounts.

Resources

  • Forum Post where core concepts were introduced and discussed.
  • GitHub repository where HybridCustody core contract is maintained. Check out the repository for more advanced script or transaction examples.
  • Example Account Linking project with Magic.
  • Starter template for Niftory Account Linking API.
  • Scaffold to start a new Account Linking project. Check out Flow CLI Scaffolds to get started.
  • Wallet API is a microservice that enables apps to custody accounts. This is useful if you don't want to use a third-party service to manage user accounts.
  • Walletless Arcade example demonstrates Account Linking with a local key management solution.