Hello, everyone ♥
I build a web application with API with two types ( public & private)
the private one is secured by Authintcation ( sanctum)
my question is how to secure public one to be sure no one else can use it except the application
@bugsysha
Reson of my question is I made an e-commerce website so I don't want anyone has an end-point to get JSON data as example for products i need to secure every thing and save server resources as well
Reson of my question is I made an e-commerce website so I don't want anyone has an end-point to get JSON data as example for products i need to secure every thing and save server resources as well
@msaied Well, guess what? You have to use authentication.
You can’t have an API publicly accessible on the Internet that magically blocks access to every one but a particular mobile app. The mobile app needs to use some sort of authentication mechanism to identify itself so the API can go, “Oh, you’re the mobile app? Cool, I’ll let you access endpoints.”
If you don’t have authentication, then any one can just watch traffic between your server and the mobile app, get the API endpoint URLs, and start making requests themselves.
@martinbean Thanks for your reply, I already use authentication for users, But my exact question is " how to secure connection between the mobile app and my website "