Simply, I've an React-App (I'am new to this domain , as per my knowledge all the request sent from React apps are visible in the browser's network tab).Their is no provision for a server side request that can be hidden from the browser.
I've to implement an authentication mechanism for this application. But, I've few questions regarding the approach.
- As all the request are visible. How will my generate-token request be secure? Anyone can inspect and get my token generation parameters.
- Once token is generated, It is supposed to be used by subsequent requests, Then is'nt it possible for anyone to get my token.
How to make it secure?
I think its not possible to mask/hide any parameters or token. The only way to make it secure is to.
Authentication should be user-login based clubbed with IP/User-Agent and a few more parameters.This way when we identify that someone else who should not be having the token is using the token, he should get unauthorized response.