identity_type is set dynamically above