Spaces:
Running
Running
File size: 1,279 Bytes
8f62665 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
<!DOCTYPE html>
<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> |