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:
@@ -14,7 +14,6 @@
|
||||
import { profile } from '$lib/utils/store/user';
|
||||
import { currentOrg } from '$lib/utils/store/org';
|
||||
import { capturePosthogEvent } from '$lib/utils/services/posthog';
|
||||
import { snackbar } from '$lib/components/Snackbar/store';
|
||||
|
||||
let supabase = getSupabase();
|
||||
let fields = Object.assign({}, SIGNUP_FIELDS);
|
||||
@@ -44,21 +43,6 @@
|
||||
try {
|
||||
loading = true;
|
||||
|
||||
// Check if the email address is disposable
|
||||
const emailCheck = await fetch('https://is-disposable-email.ephraimduncan68.workers.dev/', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({ email: fields.email })
|
||||
});
|
||||
const emailCheckResponse = await emailCheck.json();
|
||||
|
||||
if (emailCheckResponse.isDisposable === true) {
|
||||
snackbar.error('The email you provided is disposable');
|
||||
return;
|
||||
}
|
||||
|
||||
const {
|
||||
data: { session },
|
||||
error
|
||||
|
||||
Reference in New Issue
Block a user