Hello,
I am using the code that was generated by the AI in the Appwrite Dashboard. Sadly, the mentioned mathods are not available in the sdk.
import sdk from 'node-appwrite';
// Init SDK
const client = new sdk.Client();
const account = new sdk.Account(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<PROJECT_ID>') // Your project ID
.setKey('<YOUR_SECRET_KEY>') // Your secret API key
;
const promise = account.createSession('email@example.com', 'password');
promise.then(function (response) {
console.log(response); // Success
}, function (error) {
console.log(error); // Failure
});
A lot of this server side auth is avaliable in the 1.5 release which, I believe, will be released relatively soon. Otherwise I think you're going to struggle with server side auth.
The code above is valid with 1.5, the docs are updated to give a sneakpeak of sorts for whats to come.
I was searching in the normal docs and was wondering why all the methods are not available. Thank you for letting me know!
[SOLVED] How to Login a User with node-appwrite?
When looking make sure you have cloud or 1.4.x selected in the dropdown.
It is not possible to use the Client Side SDK for Server Side Auth, is it?
Recommended threads
- Upgrade Issue
Am having issue upgrading my appwrite account to pro as my card number is 19 and the required input is 16 digit
- createEmailPasswordSession Error using S...
Did someone succeed using SSR approach for login?
- [Solved] how to get user prefs from serv...
i want to get a specific users preferences from serverside maybe i missunderstood something