Back

I am getting an error"Invalid UserID " while signing up in my project.

  • 0
  • Databases
  • Auth
  • Web
rishika.r
18 Jul, 2024, 05:21

This is my code constructor() { this.client .setEndpoint(conf.appwriteUrl) .setProject(conf.appwriteProjectId); this.account = new Account(this.client);

TypeScript
}

async createAccount({email, password, name}) {
    try {
        const userAccount = await this.account.create(ID.unique(), email, password, name);
        if (userAccount) {
            // call another method
            return this.login({email, password});
        } else {
           return  userAccount;
        }
    } catch (error) {
        throw error;
    }
}
TL;DR
Issue: Developers are encountering an "Invalid UserID" error when signing up in the project. Solution: To rectify the "Invalid UserID" error, ensure the correct user ID is being generated and passed when calling the `create` method. Double-check the `ID.unique()` functionality and its implementation to guarantee the proper creation of user IDs.
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