I know that I can create my own custom role by creating another table that contains roles. But I discovered that I can create my own custom role built-in inside the Supabase Database, which is easier whenever I want to create some RLS based on users role from the dropdown menu, so I don’t have to create a query to validate the role of the users.
Here is my custom Roles:
And this is the dropdown menu I mentioned earlier
The question is, how can I create users and assign their roles? I have tried these JSON bodies:
{
"email":"[email protected]",
"password":"12345678",
"data": {
"username":"testeriz",
"role":"owner"
}
}
and
{
"email":"[email protected]",
"password":"12345678",
"role":"owner"
"data": {
"username":"Miming"
}
}
But the result is always authenticated
like this: