So I cannot create account aka when I click the submit button the account doesnt appear on the Auth page of appwrite. However, an account can be created when it is a const, what I mean is when i use this syntax at the end of the code so not in the function. const result = await account.create( ID.unique(), // userId 'email11@example.com', // email 'setpassword11', // password 'Clarissa' // name (optional)
How do I fix this? Thank u! Also, no logs are created right after submitting on the console.
TL;DR
Issue: Unable to create an account from a function due to account not appearing on Auth page of appwrite. Logs are not generated on console after submission.
Solution: Move the account creation code inside the function instead of at the end of the code to successfully create an account. Update the code structure to ensure the account creation process occurs within the function scope for proper execution.Recommended threads