feat: verify users email (#215)

* worked on the email verification

* worked on the email verification

* fixed the emailing issue and the supabase updating issue

* chore: add timer to resend, add supabase.server, enforce unique email

* chore: remove nodemailer logger

* remove async

* remove disposable email verification

---------

Co-authored-by: Rotimi Best <[email protected]>
This commit is contained in:
Em_Dev
2024-03-22 06:30:24 +01:00
committed by GitHub
co-authored by Rotimi Best
parent 5a566cbb4f
commit bd905b580a
17 changed files with 261 additions and 38 deletions
+3 -2
View File
@@ -22,7 +22,7 @@
import showAppsSideBar from '$lib/utils/functions/showAppsSideBar';
import isPublicRoute from '$lib/utils/functions/routes/isPublicRoute';
import { user, profile } from '$lib/utils/store/user';
import { getSupabase, isSupabaseTokenInLocalStorage } from '$lib/utils/functions/supabase';
import { getSupabase } from '$lib/utils/functions/supabase';
import { isMobile } from '$lib/utils/store/useMobile';
import { ROUTE } from '$lib/utils/constants/routes';
import { getOrganizations } from '$lib/utils/services/org';
@@ -41,6 +41,7 @@
let supabase = getSupabase();
let path = $page.url?.pathname?.replace('/', '');
let queryParam = $page.url?.search;
let carbonTheme: CarbonTheme = 'white';
const delayedPreloading = derived(navigating, (currentPreloading, set) => {
@@ -82,7 +83,7 @@
console.log('Get user', authUser);
if (!authUser && !isPublicRoute($page.url?.pathname)) {
return goto('/login?redirect=/' + path);
return goto('/login?redirect=/' + path + queryParam);
}
// Skip refetching profile, if already in store