Is consume a client web service from web browser good practice?

18 views Asked by At

I'm developing a web application and I need to consume a service from the client side. I will deploy the service on the client and consume it from the web browser with Angular. Is this good practice?

I need to deploy the service on the client because the user needs to interact with peripherals on the web browser.

1

There are 1 answers

0
maxkart On

Consuming web services through the browsers is a pretty standard practice most of the platforms now use some sort of REST APIs.

Security Considerations Depending on the complexity and criticality of the application you would want to consider implementing a security framework. Check out oAuth2, open-id-connect & https

https://restfulapi.net/security-essentials/

Hosting Infrastructure Both AWS and Azure provide framework for authentication and authorisation frameworks

https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-integrate-with-cognito.html

https://learn.microsoft.com/en-us/azure/active-directory/hybrid/choose-ad-authn

You could also consider one of a third part services such as

https://developer.okta.com/blog/2019/09/04/securing-rest-apis

Finally most hosting services will also recommend you to implement https.

BR