Implementing custom email authentication with Para
Para’s SDK enables you to implement custom email-based authentication flows in your application. This guide demonstrates how to create a complete email verification and wallet creation flow with your own UI components.
It’s not recommended to create a custom UI but instead use Para’s ParaModal component for a fully managed authentication experience. However, if you need to implement a custom flow, this guide will help you set it up.
First, determine if the user already exists in your system:
Copy
Ask AI
const checkUserExists = async (email: string) => { const isExistingUser = await para.checkIfUserExists({ email }); if (isExistingUser) { // Proceed with login flow for existing user } else { // Proceed with signup flow for new user }};
const registerNewUser = async (email: string) => { // Create new user with provided email await para.createUser({ email }); // User will receive verification email // Proceed to verification step};