The default rule added to the Auth0 tenant passes groups through. When there is only a single group associated with an identity it comes back as a string value instead of an Array and the API call fails because its expecting an Array.
This fixes it in the rule (which is my current workaround) but I suspect there is another issue somewhere in your API where these groups are returned that may be a better place for a fix.
json: {
connectionName: context.connection || user.identities[0].connection,
groups: user.groups
groups: Array.isArray(user.groups) ? user.groups : [ user.groups ]
}
I also saw this in lib/queries.js which leads me to believe the groups are getting completely wiped out instead of reassigned to an Array?
if (!Array.isArray(groupMemberships)) {
groupMemberships = [ ];
}
maybe needs to be...
if (!Array.isArray(groupMemberships)) {
groupMemberships = [ groupMemberships ];
}
The default rule added to the Auth0 tenant passes groups through. When there is only a single group associated with an identity it comes back as a string value instead of an Array and the API call fails because its expecting an Array.
This fixes it in the rule (which is my current workaround) but I suspect there is another issue somewhere in your API where these groups are returned that may be a better place for a fix.
I also saw this in
lib/queries.jswhich leads me to believe the groups are getting completely wiped out instead of reassigned to an Array?maybe needs to be...