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

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay