Hi, im building a sort of an spa app with angular and nodejs. This app will call some api from a provider that the user will choose and authenticate with. Now, I want to implement route guarding to prevent someone navigating to a route that displays api info while he is not authorized ( does not have access token ). My question is, what is the best practice to check if a user have an access token and is authorized while using multilple providers. I have thought about implementing REST endpoints from express.js for each provider and return if the user have an access token, therefore in my angular app I would have to request every endpoint and activate my route if authorized. However, I feel like this might not be the best solution. Should I assemble the logic to one endpoint in the backend ?
Hi, im building a sort of an spa app with angular and nodejs. This app will call some api from a provider that the user will choose and authenticate with. Now, I want to implement route guarding to prevent someone navigating to a route that displays api info while he is not authorized ( does not have access token ). My question is, what is the best practice to check if a user have an access token and is authorized while using multilple providers. I have thought about implementing REST endpoints from express.js for each provider and return if the user have an access token, therefore in my angular app I would have to request every endpoint and activate my route if authorized. However, I feel like this might not be the best solution. Should I assemble the logic to one endpoint in the backend ?
Hi, im building a sort of an spa app with angular and nodejs. This app will call some api from a provider that the user will choose and authenticate with. Now, I want to implement route guarding to prevent someone navigating to a route that displays api info while he is vshare not authorized ( does not have access token ). My question is, what is the best practice to check if a user have an access token and is authorized while using multilple providers. I have thought about implementing REST endpoints from express.js for each provider and return if the user have an access token, therefore in my angular app I would have to request every endpoint and activate my route if authorized. However, I feel like this might not be the best solution. Should I assemble the logic to one endpoint in the backend ? https://discord.software/ FetLife