YOUR_AUTH_TOKEN
Hi,
in your docs, you're mentioning authToken, but I can't seem to find the way to set/get/fix this. How do I get a token, in order to be able to push data to a widget?
Your product is totally awesome, but documentation is kind of sparse. Best, Tomaz
Hi Tomaz,
I'm sorry that wasn't clear in the docs. I'm still planning to write some more guides on how to do common things.
You can configure the auth token in two ways.
-
In your dashbling.config.js:
module.exports = { // other config here authToken: "just testing" };This is not recommended though, because you'd be committing the token into your repository.
-
Using an environment variable.
The
AUTH_TOKENenvironment variable can be used to set the authToken. How you set this exactly depends a little on your deployment strategy. In Heroku for example you can simply add an environment variable calledAUTH_TOKEN, for local development you might runAUTH_TOKEN=development yarn startin your terminal.
Let me know if something still isn't clear! I'll try to write this up in a guide soon.