The situation is that there is a backend Web API which requires the front-end page caller provides the authorization data (username and password). And I need to write a front-end web client code to be the Web API caller. (It's a general usage no matter what which language is)
The Web API has only provides the Basic Authorization, no other ways to do it like token or something else.
If I directly wrote the username and password as plain text on the client side code, the user could see these plain text in the source code from browser easily.
I wonder what is the best practice to handle these authorization data in front-end client side page?
Thanks