DEV Community

Adnan Ahmad Khan
Adnan Ahmad Khan

Posted on

error in login function using Appwrite

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

Top comments (0)