DEV Community

Adnan Ahmad Khan
Adnan Ahmad Khan

Posted on

1

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

SurveyJS custom survey software

Build Your Own Forms without Manual Coding

SurveyJS UI libraries let you build a JSON-based form management system that integrates with any backend, giving you full control over your data with no user limits. Includes support for custom question types, skip logic, an integrated CSS editor, PDF export, real-time analytics, and more.

Learn more

Top comments (0)