error in login function using Appwrite
Adnan Ahmad Khan
Posted on May 21, 2024
client = new Client();
account
constructor(){
this.client
.setEndpoint(conf.appwriteUrl)
.setProject(conf.appwriteProjectId)
this.account = new Account(this.client)
}
async login({email,password}){
try {
//const account = this.account
//console.log(typeof(email))
// await this.account.createEmailSession(email,password).then((res)=>(
// console.log(res)
// ))
return await this.account.createEmailSession(email,password)
} catch (error) {
console.log("AuthService service :: login() :: " + error.message)
throw error
}
}
This is the code in which at login in I ran into a problem station this.account.createEmailSession is not a function
Can anyone help me in this
AuthService service :: login() :: this.account.createEmailSession is not a function
Posted on May 21, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.