Skip to main content

Enable email verification

  • Email verification is turned off by default. It is strongly encouraged to enable it to ensure the authenticity of your users.
  • If you are already using SuperTokens in production and turn on email verification, your users will be redirected to the email verification screen next time they use your application.

Switch on Email Verification#

import SuperTokens from "supertokens-auth-react";import ThirdParty from "supertokens-auth-react/recipe/thirdparty";import Session from "supertokens-auth-react/recipe/session";
SuperTokens.init({    appInfo: {        apiDomain: "...",        appName: "...",        websiteDomain: "..."    },    recipeList: [        ThirdParty.init({            emailVerificationFeature: {                mode: "REQUIRED"            }        }),        Session.init()    ]});

The default UI#

When a new user signs up with an unverified email, they will receive an email to verify their address and be redirected to the following screen:

Email verification UI when the link in email is not clicked

After they have clicked on the email, they will see this screen:

Email verification UI once the link in email is clicked