Do a testing registration on the following example-site, and see if your wished functionality is able to be done by code…
https://russian-dima.wixsite.com/login-system/vnloginmgm
import { authorization } from 'wix-members-backend';
export function myAssignRoleFunction() {
const roleId = "b62310c1-1c81-4ca9-9fe9-42b48f6e164e";
const memberId = "72751428-2743-4bda-acf5-4218a4279cd3";
const options = {
suppressAuth: false
};
return authorization.assignRole(roleId, memberId, options)
.then(() => {
console.log("Role assigned to member");
})
.catch((error) => {
console.error(error);
});
}