Auth0 不允许的其他属性:成员资格
Auth0 Additional properties not allowed: memberships
我正在使用 Auth0 Delegated Administration Extension 来管理用户。当我尝试创建用户时,出现此错误。
Oh snap! You got an error!
An error occurred while creating the user:
{"statusCode":400,"error":"Bad Request","message":"Payload validation
error: 'Additional properties not allowed: memberships (consider
storing them in app_metadata or user_metadata. See \"Users Metadata\"
in https://auth0.com/docs/api/v2/changes for more
details)'.","errorCode":"invalid_body"}
我该如何解决这个问题并创建用户?
在您的创建挂钩中,尝试以下操作:
return cb(null, {
...
app_metadata: {
memberships: memberships
}
});
您必须构建发送到 API 的对象。有些人想将它存储在 app_metadata.groups
其他人在 app_metadata.departments
...
我正在使用 Auth0 Delegated Administration Extension 来管理用户。当我尝试创建用户时,出现此错误。
Oh snap! You got an error!
An error occurred while creating the user: {"statusCode":400,"error":"Bad Request","message":"Payload validation error: 'Additional properties not allowed: memberships (consider storing them in app_metadata or user_metadata. See \"Users Metadata\" in https://auth0.com/docs/api/v2/changes for more details)'.","errorCode":"invalid_body"}
我该如何解决这个问题并创建用户?
在您的创建挂钩中,尝试以下操作:
return cb(null, {
...
app_metadata: {
memberships: memberships
}
});
您必须构建发送到 API 的对象。有些人想将它存储在 app_metadata.groups
其他人在 app_metadata.departments
...