Home / Companies / SuperTokens / Blog / Post Details
Content Deep Dive

How to create an invite-only auth flow in 2023

Blog post from SuperTokens

Post Details
Company
Date Published
Author
Joel Coutinho
Word Count
1,174
Language
English
Hacker News Points
-
Summary

In this blog post, the process of implementing an invite-only user authentication flow in a React app using SuperTokens is outlined. The app is set up with a React frontend and NodeJS backend, utilizing SuperTokens for email-password authentication. The guide explains how to disable the default sign-up functionality in both the frontend and backend by hiding the UI elements and overriding the API configurations. It details the creation of a protected API that allows only admin users to invite new users by generating and sending password reset links as invite links. The invitees must reset their passwords before signing in, preventing the use of a common fake password. The customization ensures that only invited users can access the app, providing a straightforward way to enhance user exclusivity and engagement.