0

I'm coming here to ask how to handle the credentials rotating in my JS app? Am I able to make an API request to get the credentials? I've looked at quite a few topics but none give direct answers so I hoped I'd ask for myself.

1 Answer 1

0

You don't handle it explicitly. Your application should access your Heroku Postgres database through the DATABASE_URL environment variable (or other environment variable created by Heroku, if applicable).

When changes occur to the active database service or to the assigned credential, or if you perform an explicit rotation, Heroku restarts your app and provides the new values via environment variable.

3
  • How would this manage user and password? Thanks for the response Commented Sep 12, 2020 at 23:54
  • The username and password are stored in the DATABASE_URL environment variable, which different environments consume in different ways. There are examples for various stacks, including Node.js, in the Heroku documentation Commented Sep 13, 2020 at 2:01
  • Thank you for the help Commented Sep 14, 2020 at 0:26

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.