🐛 fix(register): Adjust user email verification logic to handle domain suffix checks correctly
This commit is contained in:
parent
a593eac119
commit
686aa2d0ba
@ -31,11 +31,10 @@ export default function RegisterForm({
|
|||||||
|
|
||||||
const handleCheckUser = async (email: string) => {
|
const handleCheckUser = async (email: string) => {
|
||||||
try {
|
try {
|
||||||
|
if (!auth.email.enable_verify) return true;
|
||||||
const domain = email.split('@')[1];
|
const domain = email.split('@')[1];
|
||||||
const isValid =
|
const isValid = auth.email?.domain_suffix_list.split('\n').includes(domain || '');
|
||||||
!auth.email.enable_verify ||
|
return isValid;
|
||||||
auth.email?.domain_suffix_list.split('\n').includes(domain || '');
|
|
||||||
return !isValid;
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('Error checking user:', error);
|
console.log('Error checking user:', error);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user