mirror of
https://github.com/exchanges-lab/view.git
synced 2026-08-07 22:24:42 +08:00
Fixed email restriction.
This commit is contained in:
@@ -11,4 +11,3 @@ const AUTH_CONFIG = {
|
||||
};
|
||||
|
||||
window.AUTH_CONFIG = AUTH_CONFIG;
|
||||
window.ALLOWED_EMAILS = ['your-email@gmail.com'];
|
||||
|
||||
@@ -126,14 +126,6 @@
|
||||
const credential = response.credential;
|
||||
const userData = parseJwt(credential);
|
||||
|
||||
// Email whitelist verification
|
||||
const allowedEmails = window.ALLOWED_EMAILS || ['your-email@gmail.com'];
|
||||
if (!allowedEmails.includes(userData.email)) {
|
||||
document.getElementById('error-msg').textContent = 'Access denied: unauthorized email.';
|
||||
document.getElementById('error-msg').style.display = 'block';
|
||||
return;
|
||||
}
|
||||
|
||||
const user = {
|
||||
email: userData.email,
|
||||
name: userData.name,
|
||||
|
||||
Reference in New Issue
Block a user