Back

[SOLVED] Where to store function keys/tokens?

  • 1
  • Functions
dammy
3 May, 2023, 15:35

Is it safe to save an API endpoint or authentication token that's required for communication by dart cloud function file inside the file using variable?

I'll appreciate a better and secure say to do so if answer was no

TL;DR
A user had a question about where to store function keys/tokens. Another user suggested using environment variables, which are stored encrypted inside the database. The API key can be stored as plain text in a secure location. The recommended way to store keys/tokens is to use environment variables, which can be set in the function settings page.
Binyamin
3 May, 2023, 15:40

For the endpoint it's okay. For the API key if you'll put it as plain text it's not bad as the it's inside a file that is in a secure location

But it's recommend to use environment variables. You can set those in the function settings page

Binyamin
3 May, 2023, 15:43

The reason for that is that environment variables are stored encrypted inside the database.

dammy
3 May, 2023, 15:43

Env variable was also what I saw on the net, but how do I do that please, haven't gotten any descriptive way, since am about using dart cloud function for the first time

dammy
3 May, 2023, 15:46

I see

Binyamin
3 May, 2023, 15:46
dammy
3 May, 2023, 15:46

I'll check how to, I appreciate you dearly @Binyamin for coming through

Binyamin
3 May, 2023, 15:46

These are the two places which you can add environment variables

dammy
3 May, 2023, 15:49

wow, I just understood after watching for more than one time.

Nice, this is great job done by appwrite team.

I appreciate you @Binyamin

I guess you're one of the moderators?

Binyamin
3 May, 2023, 15:49

I guess you're one of the moderators? No,

dammy
3 May, 2023, 15:59

Okay, nice job, I appreciate your tireless efforts and help

dammy
3 May, 2023, 16:00

I was able to create env variables like breeze ✌️

Drake
3 May, 2023, 16:36

[SOLVED] Where to store function keys/tokens?

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more