Social Provider User Retains User ID on Deletion

Overview

When a user that comes from Facebook or Apple is created in Auth0, the user_id is assigned as facebook|xxxxxxxx or apple|xxxxxxxxx metadata.

When the user is deleted from Auth0 and then the user logs in again with the same Facebook or Apple account, the user_id is preserved.

Cause

The user_id remains the same if the account is deleted within Auth0.

For instance, if logging in to the application using a Google Social connection with the email “test@example.com”, the user_id is returned as “google-oauth2|112233”. If the user is then deleted via the Auth0 dashboard and if they then log in again using the same “test@example.com” email and Google Social connection, their user_id will still be “google-oauth2|112233” as this is the ID that was received from the social provider - Google in this case.

The social identity provider will return the same user_id, which usually does not change after deleting and re-logging in.

Solution

It is as per design as the social identity provider will return the same user_id, which usually does not change after deleting and re-logging in.