Skip to content
Back

users.create issue

  • 0
  • Auth
  • Functions
  • Cloud
rlee128
27 Aug, 2025, 14:02

When using users.create with password undefined it creates an anonymous user even through email and phone number and name are added. If I do a blank space for password it gives an error that the password length must be at least 8. Is there a way to create a user so that the email address phone number and name are populated?

TL;DR
Developers having an issue with creating a user and getting an anonymous user even when email, phone, and name are provided. The problem was identified as occurring in node-appwrite version 18.0.0, switching back to 17.2.0 solved the issue. Updating to a newer version fixed the problem.
ideclon
27 Aug, 2025, 14:21

What version of the SDK are you using?

ideclon
27 Aug, 2025, 14:26

Can't reproduce

TypeScript
node-appwrite@18.0.0:
const user = await users.create({
    userId: "unique()",
    name: "Demo user",
    email: "demo@example.org"
});
TypeScript
node-appwrite@17.2.0:
const user = await users.create(
  "unique()",
  "demo@example.com",
  undefined,
  undefined,
  "Demo User"
);

Tested against Appwrite v1.8.0

ideclon
27 Aug, 2025, 14:27
rlee128
27 Aug, 2025, 14:33

I see the issue for some reason it is running version 9.0.0 i will update it and see what happens

ideclon
27 Aug, 2025, 14:35

I just tried with node-appwrite@9.0.0 (using the same code as for node-appwrite@17.2.0 above) and it worked

rlee128
27 Aug, 2025, 14:36

This is what I was trying await users.create(ID.unique(), data.email, data.number, undefined, data.name);

ideclon
27 Aug, 2025, 14:36

And what do you get? Have you checked that the email address, phone number and name in those variables is actually what you're expecting?

rlee128
27 Aug, 2025, 14:37

Yes they were all there doing a log but it would just make an anonymous user but trying with the update now

ideclon
27 Aug, 2025, 14:38

What's the response on users.create()?

rlee128
27 Aug, 2025, 14:44

{"$id":"68af19c70017708ed8de","$createdAt":"2025-08-27T14:44:23.470+00:00","$updatedAt":"2025-08-27T14:44:23.470+00:00","name":"","password":null,"hash":"argon2","hashOptions":{"type":"argon2","memoryCost":2048,"timeCost":4,"threads":3},"registration":"2025-08-27T14:44:23.469+00:00","status":true,"labels":[],"passwordUpdate":"","email":"","phone":"","emailVerification":false,"phoneVerification":false,"mfa":false,"prefs":{},"targets":[],"accessedAt":""}

rlee128
27 Aug, 2025, 14:45

Thats what I get still with await users.create({ userId: ID.unique(), email: data.email, phone: data.number, name: data.name });

rlee128
27 Aug, 2025, 14:45

Confirmed its the 18.0.0 version

ideclon
27 Aug, 2025, 14:45

Huh. And data.email, etc, definitely contains an email address?

rlee128
27 Aug, 2025, 14:47

Here is the whole log:

TypeScript
{"email":"king33722000@gmail.com","name":"Rickey Lee","number":"+12205559092"}
{"$id":"68af19c70017708ed8de","$createdAt":"2025-08-27T14:44:23.470+00:00","$updatedAt":"2025-08-27T14:44:23.470+00:00","name":"","password":null,"hash":"argon2","hashOptions":{"type":"argon2","memoryCost":2048,"timeCost":4,"threads":3},"registration":"2025-08-27T14:44:23.469+00:00","status":true,"labels":[],"passwordUpdate":"","email":"","phone":"","emailVerification":false,"phoneVerification":false,"mfa":false,"prefs":{},"targets":[],"accessedAt":""}```
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