Do you get results at this point …?
authentication
.register(email, password, options)
.then((results)=>{
console.log("RESULTS: "; results);
});
Is the role/role-ID already included inside the resulting-object, at this point?
Directly after the registration you gets logged-in. This causes a page-reset.
But wait!!! What??? → You get automatically logged-in !!!
Ok, maybe you need to use in this case an → “onLogin()” event-trigger???
Something like…
MASTER-PAGE:
$w.onReady(()=>{
wixMembers.authentication.onLogin((member)=> {
console.log("Member: ", member);
});
});