async createAccount({email, password, name}) { try { const userAccount = await this.account.create(ID.unique(), email, password, name); if (userAccount) { return this.login({email, password}); } else { return userAccount; } } catch (error) { throw error; } }
plus i am getting Rate limit for the current endpoint has been exceeded. How to resolve it
The only resolve if using cloud is to wait out the rate limit time.
What user id is it sending? You should be able to see this in the network request
You get 10 requests per 60 minutes from the same IP + URL
66a957bf00091079bd45
this is one of the userId
What is the function login
async login({email, password}) { try { return await this.account.createEmailPasswordSession(email, password); } catch (error) { throw error; } }
before i was using just createSession
but when i switched to createEmailPasswordSession it started showing rate limit
plus i want to ask one more thing why it was showing createEmailSession is not a function
Because it's not?
Are you importing ID from appwrite?
yeah
Do you have the error it's throwing in the console? Does it have a stack trace?
Invalid userId param: Parameter must contain at most 36 chars. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char
i guess you are asking this.
Did you do any searching in support before posting the question? Looks like you got your code from a tutorial or something? Seeing a lot of people with the same code and problem
Look at one of those posts
no i didn't search anything before
yeah its from a tutorial
Search for your error in support, you'll find others with the exact same code
Recommended threads
- The current user is not authorized to pe...
I want to create a document associated with user after log in with OAuth. The user were logged in, but Appwrite said user is unauthorized. User is logged in wi...
- self-hosted auth: /v1/account 404 on saf...
Project created in React/Next.js, Appwrite version 1.6.0. Authentication works in all browsers except Safari (ios), where an attempt to connect to {endpoint}/v1...
- Rate Limit of project
AppwriteException: Rate limit for the current endpoint has been exceeded. Please try again after some time. So , how much time I have to wait and why does it h...