#KEY and SECRET

4 messages · Page 1 of 1 (latest)

blazing beacon
#

When installing Direstus with docker, the docs suggest to enter a KEY and SECRET value.
For this project, Directus will only serve data to the web site. Images, articles, etc. All that data is readable by the "public" user.

The site admin will only create, modify and delete data through the Directus app.

Knowing this, do I need to set the "KEY" and "SECRET"?
Would there be a reason to set them even though no external client will be interacting with the api, apart from reading data?

That's probably an obvious question for some, but I trying to have a full understanding of what I'm trying to do and not just follow step by step tutorials without understanding well...

thanks!

eric

sinful patrol
#

Knowing this, do I need to set the "KEY" and "SECRET"?
Yes because if nothing else they're required by Directus 🙂 If unsure what to put in it you can generate a long random string on random.org or uuidgenerator.net

blazing beacon
#

ok. because until now, I've been learning Directus in a development instance on my computer. When requesting data from the api, I don't use a KEY. So now, I neeed to set up Directus (on my server) with a KEY and SECRET and use the key in my fetch request ?

sinful patrol
#

They arent directly involved for API requests (KEY is not an API KEY), KEY is not generally used for local hosting but is used to tell different instances apart in situations where you're running multiple directusses and SECRET is used for the encryption of user passwords. Even tho you may not be using the KEY it is still a required variable