Email Verification

Confirm that users own the email address they registered with using a secure token sent by Koolbase.

How it works

1

User registers — account is created with verified: false

2

Your app calls sendVerificationEmail() — Koolbase sends a one-time token to the user's email

3

User clicks the link — your app receives the token from the deep link

4

Your app calls verifyEmail(token) — account is marked verified: true

Send verification email

Call after registration, or when a user requests a resend:

lib/auth.dartDart
await Koolbase.auth.sendVerificationEmail(
  email: 'user@example.com',
);
// Koolbase sends a token to the user's email

Email provider

Verification emails are sent via the email provider configured in your Koolbase project settings. Make sure you have configured your EMAIL_FROM address in the dashboard before going to production.

Verify the token

When the user clicks the verification link in their email, your app receives the token via deep link. Pass it to verifyEmail():

lib/auth.dartDart
// token comes from your deep link handler
final token = Uri.parse(incomingLink).queryParameters['token'];

await Koolbase.auth.verifyEmail(token: token!);

// User is now verified
final user = await Koolbase.auth.currentUser();
print(user?.verified); // true

Check verification status

lib/auth.dartDart
final user = await Koolbase.auth.currentUser();

if (user != null && !user.verified) {
  // Show verification reminder banner
  showBanner('Please verify your email to continue.');
}