Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.magic.link/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Magic’s authentication can enable passwordless Web3 onboarding (no seed phrases) using multiple configurable methods. Each method either creates an account address for the user (non-custodial) or utilizes an existing account address. This is handled completely by Magic with out-of-the-box UI, with no lift from the integrating dApp.

Compatibility

The Login UI is available via the following client-side SDKs:

Use Cases

  • Allow your users to log in and/or sign up to your dApp using their preferred authentication method and gain access to their public wallet address on the network you are connected to.
  • You can collect a signed token for wallet address verification and skip the need to explicitly request a personal signature which would prompt an additional screen.
dedicated-widget-login

Authentication Methods

Email One-Time Passcode

If a user chooses to authenticate through their email, they will receive a unique code to their email that is generated per attempt and the user will be required to enter it to authenticate. OTPs for email provide a simple and effective way to increase security and ensure the safety of user assets.

Usage

Login

JavaScript
import { Magic } from "magic-sdk"

const magic = new Magic('YOUR_PUBLISHABLE_API_KEY', {
  network: "sepolia",
});

const accounts = await magic.wallet.connectWithUI();
The example above authenticates the user and connects to the Ethereum Sepolia Testnet. To connect to a different network, simply replace the configuration with another of the 30+ chains supported by Magic.

Device Registration

Find out more about Device Registration here.

Configuration

Resources