Closed
Description
🐛 Bug Report
When attempting to migrate users using /bulk-import/import, the roles specified in the userRoles field are ignored. Additionally, even when isVerified is set to false, the response shows the verified field as true
- Issue 1: The roles defined in the
userRoles
field are ignored during migration via /bulk-import/import. - Issue 2: The
isVerified
field is set to false in the request, but the response returnsverified: true
.
Example request:
curl --location --request POST '<supertokens_core_endpoint>/bulk-import/import' \
--header 'api-key: *******************' \
--header 'Content-Type: application/json; charset=utf-8' \
--data '
{
"externalUserId": "test-external-id",
"userMetadata": {
"deviceId": "test-device-id"
},
"userRoles": [{ "role": "user", "tenantIds": [] }],
"loginMethods": [
{
"isVerified": false,
"timeJoinedInMSSinceEpoch": 1551367594480,
"recipeId": "emailpassword",
"email": "[email protected]",
"passwordHash": <password_hash>,
"hashingAlgorithm": "bcrypt"
}
]
}
'
Response:
{"status":"OK","user":{"id":"test-external-id","isPrimaryUser":false,"tenantIds":["public"],"timeJoined":1551367594480,"emails":["[email protected]"],"phoneNumbers":[],"thirdParty":[],"webauthn":{"credentialIds":[]},"loginMethods":[{"tenantIds":["public"],"recipeUserId":"test-external-id","verified":true,"timeJoined":1551367594480,"recipeId":"emailpassword","email":"[email protected]"}]}}
Useful informations
I'm using latest supertokens-docker-mysql image. I don't use multi-tenancy. Role user is already defined.