How are you creating account?
Following code:
async function register(email, password, name) {
try {
await account.create(ID.unique(), email, password, name);
//await login(email, password);
setSuccessMessage('Registered and logged in successfully.');
} catch (error) {
setError('Failed to register. Please try again.');
}
}
But where are you creating account?
await account.create(ID.unique(), email, password, name);
but I am assuming you meant:
const account = new Account(client);
which is missing yes...
createEmailPasswordSession is for v1.5.0, and this version isn't released yet
So what would be the fix hah
Only in server side...
I was following this page https://appwrite.io/docs/products/auth/email-password and https://appwrite.io/docs/quick-starts/react
Yes, I mean const account = new Account(client);
Where's that?
In v1.4 you should use createEmailSession
createEmailPasswordSession is renamed in v1.5, v1.4 uses createEmailSession
I did miss that one yes addind it did produce many of errors tho so assuming I messed up something else.
Oh actually, you're right! Docs are so confusing!
Yes, as @Guille said, It should be account.createEmailSession(), not account.createEmailPasswordSession()
Yeah, I've seen many people confused about new methods and functions from 1.5 vs 1.4
yep that worked
thank you for help both also what docs should I use since I am completly confused now?
I usually check the API references and manually select v1.4, but I just glanced at https://appwrite.io/docs/products/auth/email-password this time
The docs have been updated to be accurate for v1.5, which hasn't been released yet
Yean will be better to manually select v1.4 to avoid problems
okey so need to look at 1.4 okey yea tnx
[SOLVED] Can't login when I create an account.
Recommended threads
- Error trying to deploy functions from CL...
✗ Error • on-auth-create (6a00b2ab000c9ce2949b) • Server Error ✗ Error: No functions were pushed. Prject ID: 69ffe0270033a4ac420a
- Intermittent Deploy and Execution Errors...
Project: project-fra-658e2f5f4ba30df91177 Function ID: 69bde006001c56757f49 **Several execution errors with:** Timed out waiting for runtime.\nError Code: 400...
- ~20 function variables disappeared
Hi, In one of my functions about 20 variables just disappeared. The "Next" button also seems to be bugged. The "total variables" text still says the correct amo...