spring-boot-security-jwt-auth-mongodb
spring-boot-security-jwt-auth-mongodb copied to clipboard
Error SignUp Role not found
I already added role to mongoDB. But still Role not found.
docker exec -it mongodb mongosh
db.roles.insertMany([
{ name: "ROLE_USER" },
{ name: "ROLE_MODERATOR" },
{ name: "ROLE_ADMIN" },
])
Then my body request like this:
{
"username": "naruto",
"email": "[email protected]",
"roles": [
"user", "mod"
],
"password": "Naruto2024!"
}
Any suggestion?
Thanks