2024-07-03 15:25:40 +00:00
|
|
|
import { Client, Users } from "@appwrite.io/console";
|
|
|
|
|
|
|
|
|
|
const client = new Client()
|
2025-04-24 14:46:03 +00:00
|
|
|
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
2024-08-21 09:16:51 +00:00
|
|
|
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
2024-07-03 15:25:40 +00:00
|
|
|
|
|
|
|
|
const users = new Users(client);
|
|
|
|
|
|
|
|
|
|
const result = await users.createScryptUser(
|
|
|
|
|
'<USER_ID>', // userId
|
|
|
|
|
'email@example.com', // email
|
|
|
|
|
'password', // password
|
|
|
|
|
'<PASSWORD_SALT>', // passwordSalt
|
|
|
|
|
null, // passwordCpu
|
|
|
|
|
null, // passwordMemory
|
|
|
|
|
null, // passwordParallel
|
|
|
|
|
null, // passwordLength
|
|
|
|
|
'<NAME>' // name (optional)
|
|
|
|
|
);
|
|
|
|
|
|
2024-08-21 09:16:51 +00:00
|
|
|
console.log(result);
|