May 21, 2024, 8:12 p.m. | Adnan Ahmad Khan

DEV Community dev.to

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() :: …

account appwrite appwritehack async catch client code console email error frontend function log login message password programming react return service try

Information Technology Specialist I, LACERA: Information Security Engineer

@ Los Angeles County Employees Retirement Association (LACERA) | Pasadena, CA

Security Compliance Manager

@ Aptiv | USA Boston Software Office 100 Northern - Eng

Senior Radar Threat Analyst | Secret clearance

@ Northern Trust | USA CA Point Mugu - 575 I Ave, Bldg 3015 (CAC212)

Space Information Systems Security Engineer (ISSE)

@ Parsons Corporation | USA VA Chantilly (Client Site)

Information Systems Security Manager -Journeyman

@ Parsons Corporation | USA CO Colorado Springs (5450 Tech Center Drive)

Information Systems Security Officer (ISSO) II

@ Northern Trust | USA CA Riverside - Customer Proprietary (CAC225)