talk icon indicating copy to clipboard operation
talk copied to clipboard

"INTERNAL_ERROR: DUPLICATE_EMAIL" after moving to SSO

Open jacotec opened this issue 2 years ago • 2 comments

To overcome the limitations with the internal registration, I've changed the authentication to OpenID-Connect (Keycloak). It's all pretty much working, but not my own user which was present with email authentication before.

Whenever I want to log in via SSO, I'm getting this error:

image

This is pretty annoying as I need to get my account back.

I've still found the old entry in the database and have deleted this old user with the same email address, afterwards I have restarted Coral. But I'm still getting this error and need a solution where this messages comes from (as there is no user with the same email in the database!).

Expected behavior:

Coral should detect collisions of the same email address and merge the info / handle the login properly.

Actual behavior:

Although I've removed the old user from the database, I'm still getting this error.

Related Issues:

Versions:

  • NodeJS: 14.18.0
  • NPM: 8.0.0
  • MongoDB: 4.4
  • Redis:
  • Browser:
  • OS:

jacotec avatar Jun 07 '22 14:06 jacotec

check to make sure you have no users with the same email in both the user.email field and the user.profiles[x].email field. For this error to occur there must still be a user in the database with the same email address or ID.

tessalt avatar Jun 10 '22 16:06 tessalt

Im also experiencing this. We have OpenID and SSO set up, but for some reason when deleting an user created with OpenID, the email sometimes remains in the database. The Mongo call in here https://github.com/coralproject/talk/blob/develop/src/core/server/services/users/delete.ts#L279 succeeds for the most part, but fails to unset the email. I can't find anything in the logs regarding this. The profiles field gets unset and the deletedAt attribute is added. Other times, the email gets unset as well.

rigperro avatar Nov 21 '22 08:11 rigperro