Design advice? Securely handle authorization serverside and check it client side?
Unanswered
Azuvector posted this in #help-forum
So, I'm handling authentication with nextauth and authorization with ldapjs(Yes, I know the issues that has.) at the moment, and I've got some metadata that's associated with routes and SIDs on AD, so users and groups can be managed there.... I'm wondering if there are architecture suggestions for associating that serverside and then validating it client side? Doing it all serverside I've got handled, but I'm wanting to leverage something more dynamic than a server only page that checks it and then passes in data to a client side prop, essentially necessitating a page refresh to recheck it. Stateless routes also seem difficult to use in that? I've heard of maybe using encrypted jwt tokens for the authorizations, but I'm wondering if there's a simpler way to do that, or if there are recommendations on packages to handle that sort of thing? Using a cloud service isn't desirable.