Back

Not able to create account from function

  • 1
  • Web
dirb
26 Aug, 2024, 00:50

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.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more