Back

[SOLVED] User Deletion Cached?

  • 0
  • Web
  • Cloud
itsjustintime
7 Jan, 2024, 10:19

Are user deletions cached or soft deletes internally?

I deleted a user with the Cloud UI and tried creating the user again about an hour later with password authentication and was prompted with: "{ "message": "A user with the same email already exists in the current project.", "code": 409, "type": "user_email_already_exists", "version": "0.12.32" }"

My dashboard definitely doesn't show that user as one of my registered users. For privacy purposes, I'll opt to not show a screenshot since it has some e-mails in there.

TL;DR
User is asking if user deletions are cached or soft deletes internally. They deleted a user but when they tried to create the user again later, they received an error message saying a user with the same email already exists. The user is not shown in the dashboard. Another user suggests using the CLI to delete the identities. It is mentioned that if a user already has a session and creates an OAuth2 session, it creates an identity linking the current user and that OAuth2 account. The user confirms that they have tried multiple emails before raising the issue. It is suggested to use the CLI and run a specific command to list the identities. The
Drake
7 Jan, 2024, 16:57

There are some additional things deleted in the background that may not have been processed yet

Drake
7 Jan, 2024, 16:58

How is it now?

itsjustintime
7 Jan, 2024, 20:03

Hmm, I'm still getting the error. Similar situation. I'll do some digging to see if there's user error from my end but so far no signs of it.

Drake
7 Jan, 2024, 21:24

Are you using oauth?

itsjustintime
7 Jan, 2024, 21:26

I'm doing all of these tests with password auth.

Though I may have tried using OAuth with these emails at some point. But they don't show up in Appwrite either.

Drake
7 Jan, 2024, 21:29

Maybe that's what happened. Can you use the CLI and run appwrite users listIdentities?

itsjustintime
7 Jan, 2024, 21:33

It lists 4 users that I've been testing with. None of these 4 that showed up in the command are in my list of users in the Auth page in the UI.

Drake
7 Jan, 2024, 21:34

And one of the emails matches the email you're trying to create?

itsjustintime
7 Jan, 2024, 21:37

yup all 4 look like e-mails I've had problems with. I had tried multiple before raising this issue.

Drake
7 Jan, 2024, 21:39

Ok that probably explains it. So if a user already has a session and creates an OAuth2 session, it creates an identity (a connection between the current user and that oauth2 account). This allows a user to log in to an oauth2 provider even if the email is different

itsjustintime
7 Jan, 2024, 21:43

interesting so a user shouldn't be allowed to set up an oauth session if they're already logged in otherwise it would tie to the provider? Which means I should hide my registration page (currently is shown even if you have an active session).

is there a way to "undo" it to unbind those emails?

Drake
7 Jan, 2024, 21:45

You can use the CLI to delete the identities

itsjustintime
7 Jan, 2024, 21:45

awesome thanks mr steven

itsjustintime
7 Jan, 2024, 21:45

[SOLVED] User Deletion Cached?

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