• Blog
  • Documentation
  • Courses
  • Changelog
  • AI Starters
  • UI Kit
  • FAQ
  • Supamode
    New
  • Pricing

Launch your next SaaS in record time with Makerkit, a React SaaS Boilerplate for Next.js and Supabase.

Makerkit is a product of Makerkit Pte Ltd (registered in the Republic of Singapore)Company Registration No: 202407149CFor support or inquiries, please contact us

About
  • FAQ
  • Contact
  • Verify your Discord
  • Consultation
  • Open Source
  • Become an Affiliate
Product
  • Documentation
  • Blog
  • Changelog
  • UI Blocks
  • Figma UI Kit
  • AI SaaS Starters
License
  • Activate License
  • Upgrade License
  • Invite Member
Legal
  • Terms of License
    • Auth Overview
    • Setting up Firebase Auth
    • Auth Flow
    • Third-Party Providers
    • Email Link Authentication
    • Multi-Factor Authentication
    • Requiring Email verification
    • Auth SSR
    • Page Guards
    • API Guards
    • Prevent abuse with AppCheck
    • Custom React Hooks
    • Troubleshooting

Requiring Email verification

Learn how to enforce email verification for your users with Firebase.

By default, Firebase does not enforce email verification. This means that users can sign up with an email address and password, and then immediately start using your app. However, you may want to require that users verify their email address before they can use your app.

To do so, Makerkit can check that the user has verified their email address before allowing them to use your app from the server side. How? When loading the server side session, we check that the user's property emailVerified is true. If not, the user is redirected to the sign in page, and signed out.

By default, this feature is disabled. To enable it, you need to set the environment variable NEXT_PUBLIC_REQUIRE_EMAIL_VERIFICATION to true.

Enabling requiring email verification

Simply set the following environment variable to true:

bash
NEXT_PUBLIC_REQUIRE_EMAIL_VERIFICATION=true

That's pretty much it!

NB: invited users are not required to verify their email address, since they are already verified by having received the invitation by email.

On this page
  1. Enabling requiring email verification