adrianhajdin / social_media_app

Build a modern social app with a stunning UI with a native mobile feel, a special tech stack, an infinite scroll feature, and amazing performance using React JS, Appwrite, TypeScript, and more.
https://jsmastery.pro
1.26k stars 381 forks source link

SignIn Logic Not Working #75

Closed TyByers21 closed 4 days ago

TyByers21 commented 5 days ago

I see several people are having the same issue, but I'm not seeing any solutions. My user is being created on the Appwrite side with the SignUp form, but everytime I try to sign in, I get the toast message "Login failed. Please try again"

Screenshot 2024-11-12 164337

TyByers21 commented 4 days ago

in case anyone is having the same issue, make sure that your api.ts file has this update:

// ============================== SIGN IN export async function signInAccount(user: { email: string; password: string }) { try { const session = await account.createEmailPasswordSession(user.email, user.password);

return session;

} catch (error) { console.log(error); } }