Spaces:
Sleeping
Sleeping
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Email Verification</title> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script> | |
</head> | |
<body> | |
<div id="message">Verifying your email...</div> | |
<script> | |
const client = new Appwrite.Client(); | |
client | |
.setEndpoint('https://cloud.appwrite.io/v1') | |
.setProject('66c2f6c7000abed7f1f9'); | |
const account = new Appwrite.Account(client); | |
const urlParams = new URLSearchParams(window.location.search); | |
const userId = urlParams.get('userId'); | |
const secret = urlParams.get('secret'); | |
if (userId && secret) { | |
account.updateVerification(userId, secret) | |
.then(response => { | |
document.getElementById('message').innerText = 'Email verified successfully!'; | |
}) | |
.catch(error => { | |
document.getElementById('message').innerText = 'Email verification failed: ' + error.message; | |
}); | |
} else { | |
document.getElementById('message').innerText = 'Invalid verification link.'; | |
} | |
</script> | |
</body> | |
</html> |