SAML is fine. There is no way to change the user_id
format that Auth0 uses.
But this might be a possible workaround, especially when only using one database connection (so there should not be any collisions with this approach).
(1)
You can use a Rule to first fetch the user.user_id
, cut off the auth|
part of just remove the |
and store this adjusted value as app_metadata
attribute to the user. This could then be an attribute sitting under: user.app_metadata.uid
for example
(2)
Next, use this user.app_metadata.uid
to map it to the
context.samlConfiguration.mappings = {
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier": "app_metadata.uid",
// ...
Here are the related docs:
Also related: