handleEmailVerification
Send an email verification to the currently signed-in user.
Usage
Use the handleEmailVerification method to send a verification email. Returns an error if no user is signed in.
VerifyEmail.tsx
import { useRefirebase } from 'refirebase/react';
export function VerifyEmail() {
const { auth } = useRefirebase();
const handleVerify = async () => {
const { error } = await auth.handleEmailVerification();
if (error) console.error(error);
};
return <button onClick={handleVerify}>Verify Email</button>;
}Return value
Returns
Promise<{ error?: ReturnType<typeof toRefirebaseError> }>An object containing an error if the operation fails.