Headless Email Signup
Introduction
This guide will help you let a user signup/login with email, without any of our UI components. We’ve split the guide into two tabs as you’ll see below. The first uses our SDK hooks (but none of the UI components) - we recommend this choice if you can. The second tab shows you how to handle email login without any SDK interaction at all i.e. API only.
Tutorial
Configuring the SDK
Let’s start by installing our packages. Follow our Quickstart guide for a detailed walkthrough.
When you’re done, we’ll update our App.js to include our environment ID in the setup and import the DynamicContextProvider
and EthereumWalletConnectors
.
You app.js file should look like this (note that we are only importing the EthereumWalletConnectors for now):
useConnectWithOtp
All we will need for this use case is the useConnectWithOtp hook. This exposes multiple methods, and we are interested primarily in the following:
- connectWithEmail
- verifyOneTimePassword
Once you have those available in your component, the rest is as simple as building your form!
Code Example
Was this page helpful?