Back
account.createVerification('https://cloud.appwrite.io/v1/account/verify'); not working
- 0
- Android
- Databases
- Auth
- Apple
- React Native
here is how my code looks for handling sign ups i keep getting Error sending verification email: [AppwriteException: Invalid url param: URL host must be one of: localhost, cloud.appwrite.io, appwrite.io]
const handleSignUp = async () => { const isValid = validateForm();
TypeScript
if (isValid) {
if (!agreedToTerms) {
Alert.alert('Error', 'Please agree to the Terms and Conditions.');
return;
}
setIsLoading(true); // Start loading
try {
// Create user in Appwrite
const response = await account.create(
ID.unique(),
email,
password,
name
);
// Log the user in to give them the necessary scope
await account.createEmailPasswordSession(email, password);
// Send verification email with the redirect URL
try {
await account.createVerification('https://cloud.appwrite.io/v1/account/verify');
Alert.alert(
'Email Verification',
'A verification email has been sent. Please verify your email before logging in.',
[{ text: 'OK', onPress: () => navigation.replace('SignIn') }]
);
} catch (verificationError) {
console.error('Error sending verification email:', verificationError);
Alert.alert('Error', 'Failed to send verification email. Please try again later.');
}
//Below are just some errors and other types of data
TL;DR
Developers trying to use `account.createVerification` are getting an error stating that the URL host must be localhost, cloud.appwrite.io, or appwrite.io. To resolve the issue, ensure that the URL used is one of the mentioned hosts.Recommended threads
- Cannot use createdBefore query on bulk d...
sdk: dart version: 19.2.1 ```final timestamp = DateTime.timestamp() .subtract(const Duration(days: 1)) .toIso8601String(); await databas...
- Retrieving items from appwrite collectio...
Hello team, I started experiencing a weird bug yesterday. If I add multiple new items to a collection on the same day, it doesn’t show up in my app when I fetc...
- Does anyone know default sender id and f...
Need it for otp verification in appwrite self hosted