Obtain user_metadata from access_token: Not using rules

You mention user identifier from metadata and custom databases so I’m assuming you have a different user identifier in your local database and this is currently part of metadata. In this specific situation, one option would have been to return the local user identifier in a way that it would be used as a component of the final Auth0 user identifier. This would mean you could derive the local identifier from the Auth0 identifier, but this would be a good option when starting with a fresh connection.