0

I want to create an application that will connect to AWS to use certain services. If I were to hardcode the credentials in a ReactJS file, would it be publicly visible to the end user ? What is the best way to store and use such sensitive information on a ReactJS Application ?

1
  • I don't know of a way to include credentials in ReactJS without exposing them. Typically you would require your user to authenticate in some way (username/password, OAuth, etc.) and your authentication service would return a token, which you then use to access restricted services. The token has an expiration date and can be manually invalidated if necessary. Commented Jun 6, 2018 at 1:35

1 Answer 1

2

In short: No, you can't secure your client-side credentials.

Check this article

An option

  • Make the API calls server-side and then serve information to the client from there
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.