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
- Github Student Plan showing as free plan
In my Github student plan it showing as basic plan instead of pro plan. Till few hours back it worked ok, but now showing errors and couldn't use any pro featur...
- 404 page not found
Hey I am trying to run a simple Svelte-kit project on appwrite self-hosted but the logs says: ```bash [13:56:26] [open-runtimes] Build packaging finished. [13:...
- Appwrite for Education
I am writing to report an issue with my account limits. I currently have the GitHub Student Developer Pack active, which should include 10 Appwrite Pro projects...