Following https://appwrite.io/docs/references/cloud/server-nodejs/users#createSession Here is my code sample: try { const response = await users.create(ID.unique(), email, phone); const session = await users.createSession(response.$id); return Response.json({ success: true, message: "User created successfully!", user: response, session: session }); } catch (AppWriteError: unknown) { const error = AppWriteError as AppwriteException;
return Response.json({
success: false,
message: error.message,
user: null
});
}
How to create a session for the newly created user? I know creating account will make a session, but I need to create users with email and phone.
Thanks
Recommended threads
- self-hosted auth: /v1/account 404 on saf...
Project created in React/Next.js, Appwrite version 1.6.0. Authentication works in all browsers except Safari (ios), where an attempt to connect to {endpoint}/v1...
- Having issues with login via CLI
``` ~/appwrite appwrite login --endpoint https://localhost/v1 --verbose ? Enter your email myvalidemai...
- delete document problems
i don't know what's going on but i get an attribute "tournamentid" not found in the collection when i try to delet the document... but this is just the document...