Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"INTERNAL_ERROR: DUPLICATE_EMAIL" after moving to SSO #3976

Open
jacotec opened this issue Jun 7, 2022 · 2 comments
Open

"INTERNAL_ERROR: DUPLICATE_EMAIL" after moving to SSO #3976

jacotec opened this issue Jun 7, 2022 · 2 comments
Labels

Comments

@jacotec
Copy link
Contributor

jacotec commented Jun 7, 2022

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 jacotec added the bug label Jun 7, 2022
@tessalt
Copy link
Contributor

tessalt commented Jun 10, 2022

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.

@rigperro
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants