Hi,
We are creating a website that is going to create the user and after payment creating the licence for the user, this license is then used on a desktop application that is another application. We would need to authenticate the user to be able to create a license and retrieve user information on the webpage.
The website/app is going to be a React app and will be a Next JS setup where we are able to create own “backend” routes aka fetch endpoints that can run on v8 web engine (edge) or in Node. In the React app we can call or own endpoints or straight to the cryptlex endpoints.
The idea would now be to use a cookie for example to store the user accessToken after login. Then perform user specific queries with the accessToken for example retrieving the user info for the /profile page and creating license if payment to a payment provider is a success. I understand that the user accessToken will only be able to get data from the specific user in question and no other data from another user?
This again would mean the user role should be extended with these kind of permissions. We have a super admin but seems that we could not add user permissions to the user role even with the super admin. I am also an admin at our account and can’t extend the user that was created by default at the start of the account: “You don’t have the required permissions. Please contact your admin.” Why is this?
Could this work as a setup or how should we look at this kind of setup where the website uses your authentication and web/api?