Native app: Change of user role only applied after signing out and logging in again.

2
Mendix version 8.17.0 Native app: After logging in we do an API call to check whether you are a teacher. When you're a teacher, we remove the default role and instead assign the teacher role to the user. Then we reload the app with a javascript action and a sync everything, but that's not working. In the back-end I see that the teacher role is asssigned correctly, but in the front-end of the Native app, it's not applied (yet). It seems to only be applied after signing out and logging in again. Is it possible to apply a new user role with only a reload or refresh or something like that? Or do I have to create a sign-out function with a nanoflow action? If so can you guys please tell me how to do that? :-) Thanks Marcel for your answer ;-)  
asked
1 answers
0

You are using the userroles in a different way than Mendix has designed them and yes, you do need to sign out and re-sign in to make the change of roles take effect. You can use the sign out function of “Nanoflow commons”. Look in folder Client activities.

 

answered