
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
- Stuck in "deleting"
my parent element have relationship that doesnt exist and its stuck in "deleting", i cant delete it gives me error: Collection with the requested ID could not b...
- Help with 409 Error on Relationship Setu...
I ran into a 409 document_already_exists issue. with AppWrite so I tried to debug. Here's what I've set up: Collection A has 3 attributes and a two-way 1-to-m...
- 1.7.0 Self Hosted Upgrade
Hi, I've tried a fresh install on 1.7.0 and I've also done a fresh install on 1.6.2. 1.6.2 is working fine fresh, update to 1.7.0 and migrate fails Fresh inst...
