feat: email verification via smtp

This commit is contained in:
2026-03-06 20:10:07 -05:00
parent d21265f443
commit 95da3f9543
19 changed files with 773 additions and 3 deletions
@@ -0,0 +1,15 @@
import { apiUrl } from '$lib/server/api';
import { extractError } from '$lib/utils/misc';
import { error } from '@sveltejs/kit';
export const load = async ({ url }) => {
const token = url.searchParams.get('token');
if (token) {
const res = await fetch(`${apiUrl}/api/auth/verify-email?token=${token}`);
if (!res.ok) {
const json = await res.json().catch();
const message = extractError(json);
throw error(res.status, message ?? 'Request failed');
}
}
};