I am trying to implement login system in my web app but its showing error
const handleLogin = async (e) => { e.preventDefault(); try { // Create a session using email and password const session = await account.createSession(email, password); // Only email and password should be passed here console.log('Login successful:', session); navigate('/profile'); // Redirect to profile or dashboard after successful login } catch (err) { console.error('Login failed:', err.message); setError('Login failed: ' + err.message); } }; this is my login code
Recommended threads
- appwrite auth problem regarding the sess...
Hi, I have problem with auth. When I try to login/signup using OTP, at the end session.secret is empty, i have searched online and in the docs but i cannot find...
- log out failure
I am trying to set up the user sign up/log in/log out and while I have got the sign up/log in to work, log out keeps failing. i am keeping it simple with only r...
- Use queries on relationships other than ...
Can I use queries other than Query.select on relationships such as Query.equal('relationship.someattr', 'value')?