2020-01-28 10:50:41 +13:00
|
|
|
let sdk = new Appwrite();
|
|
|
|
|
2020-02-16 19:27:55 +13:00
|
|
|
sdk
|
|
|
|
.setProject('5df5acd0d48c2') // Your project ID
|
|
|
|
;
|
|
|
|
|
2020-01-31 05:18:59 +13:00
|
|
|
let promise = sdk.account.createSession('email@example.com', 'password');
|
2020-01-28 10:50:41 +13:00
|
|
|
|
|
|
|
promise.then(function (response) {
|
2020-02-16 19:27:55 +13:00
|
|
|
console.log(response); // Success
|
2020-01-28 10:50:41 +13:00
|
|
|
}, function (error) {
|
2020-02-16 19:27:55 +13:00
|
|
|
console.log(error); // Failure
|
2020-01-28 10:50:41 +13:00
|
|
|
});
|