Email Verification
Confirm that users own the email address they registered with using a secure token sent by Koolbase.
How it works
User registers — account is created with verified: false
Your app calls sendVerificationEmail() — Koolbase sends a one-time token to the user's email
User clicks the link — your app receives the token from the deep link
Your app calls verifyEmail(token) — account is marked verified: true
Send verification email
Call after registration, or when a user requests a resend:
await Koolbase.auth.sendVerificationEmail(
email: 'user@example.com',
);
// Koolbase sends a token to the user's emailEmail provider
EMAIL_FROM address in the dashboard before going to production.Deep linking the verification email
The link in the verification email points wherever you configure your project's Verification URL under Email Branding in the dashboard. Koolbase substitutes {token} with the actual token at send time.
Universal Link (recommended for production)
https://yourdomain.com/verify?token={token}
Custom scheme (simpler, dev-friendly)
myapp://verify?token={token}Universal Links vs custom schemes
Universal Links (iOS) and App Links (Android) are https URLs your app claims via apple-app-site-association and assetlinks.json hosted on your domain. They open your app when installed and fall back to a web page when it isn't — the right choice for production.
Custom schemes like myapp:// need no domain setup but have no web fallback, and some mail clients strip them. Fine for development or internal builds.
Without a configured URL
When the user taps the link, your deep link handler extracts the token query parameter and passes it to verifyEmail() — same code path regardless of which link mechanism you chose. See the next section.
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():
// 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); // trueCheck verification status
final user = await Koolbase.auth.currentUser();
if (user != null && !user.verified) {
// Show verification reminder banner
showBanner('Please verify your email to continue.');
}