Back

Error [user_count_exceeded] when trying to login with OAuth, email exists in Identity

  • 0
  • Functions
  • Auth
  • Cloud
Bigrichardo
8 Jun, 2024, 13:12

I have a user with email 'test@test.nl', with OAuth i created an extra identity for this user under a second email address: test2@test2.nl. So this user has 1 user account with email 'test@test.nl', but 2 identity accounts: 'test@test.nl' and 'test2@test2.nl'

At a new login session i am trying to login test2@test2.nl:

TypeScript
appwriteService.account.createOAuth2Session(
        provider,
        `${window.location.origin}/`,
        `${window.location.origin}/login`,
);

I have blocked creating accounts from the client, and that only server sided functions can create accounts. But i dont want people to create a new account, but login into their existing account.

I am getting an error in de browser url: http://localhost:3000/login?error=%7B%22message%22%3A%22The+current+project+has+exceeded+the+maximum+number+of+users.+Please+check+your+user+limit+in+the+Appwrite+console.%22%2C%22type%22%3A%22user_count_exceeded%22%2C%22code%22%3A400%7D

TL;DR
Developers encountering 'user_count_exceeded' error when attempting OAuth login with an existing email linked to multiple identities. They are expecting the system to recognize existing accounts but are prompted to create new ones. To address this, they need to adjust account creation settings from the server-side to avoid user creation attempts.
Steven
8 Jun, 2024, 13:53

Weird...I expect it to use the existing account via the Identity Rather than attempt to create a new user 🧐

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more