I'm building a small web application using node.js and react.js which require user login. How to send the confidential information like username and password in get request?
Asked
Active
Viewed 207 times
0
-
Have you checked this [question](https://stackoverflow.com/questions/37328684/should-i-use-get-or-post-when-requesting-sensitive-data)? – josepdecid Mar 09 '21 at 16:57
2 Answers
1
If you absolutely need to use GET you can add the info in the query string:
get('https://example.com/login?username=XXX&password=XXX');
But this is highly discouraged. Even though the query string is encrypted when using https, this is bad design to use to transport highly sensitive such as password. Some reasons here.
A better way would be to use a POST request.
P.E. Joëssel
- 1,393
- 10
- 18