Hello, I am running Phoenix 12.35.0 on Kubernetes with keycloak auth and occassionally run into the below error "Email in Use". It clears after I remove the user from the DB or from the users section in the UI. Any idea why this happens? It reoccurs again after a while and I need to repeat this process
馃挕聽Hint: Mention RunLLM in the thread for followups.
The error you report in the your message differs from the one in the screenshot
It sounds like this consistently happens rather than being a one-off issue?
That error means Phoenix鈥檚 OAuth callback got a (client_id, sub) pair it doesn鈥檛 recognize, but the email in the token already belongs to an existing Phoenix user tied to a different sub. Deleting the row clears the email collision; next login creates a fresh row with the current sub. So something on the Keycloak side is causing the sub (Keycloak鈥檚 internal user UUID) to change for that person over time. Before you delete the row next time, can you grab:
SELECT email, oauth2_client_id, oauth2_user_id, updated_at
FROM users
WHERE email = '<affected email>';If oauth2_user_id (or oauth2_client_id) is different on each recurrence, that confirms it.
