Best practices for dynamic pages, multi organization and authentication

This actually doesn’t seem to help that much - even though it’s right - at least not in a simple fashion, I’ve attempted to make this work in my own script. It only gives you the custom claim within the JWT, so you’d need to go all the way to decode the JWT and only then you can see the org, so that’s a whole lot of extra work.

WeWeb, as far as I know (just tested it) doesn’t decode the JWT by default, it as well fetches the roles via a select to the roles table.

You would need to de-code it with Custom JavaScript, which is not quite no-code friendly.

This JWT Claim approach also is not my preferred, even though I thought it would be the best solution, because when you change the user’s role, or a user’s org, if you rely on the token information, then the user can have an “admin token” until his session expires (unless you reset it - which is yet an another hassle to do.)