Secret Environmental Variables question

I just had a question about how secret environmental variables work in Replit. My question is, if I have a secret variable that I use in my code and then use another variable to reference the secret environmental variable, could someone who looks at my public shared Repl be able to view or print out the secret variable by accessing the new variable pointing to the secret variable?

secret_env_var = 555

#code begins

new_variable = secret_env_var

#person views published repl and prints the new_variable...


#does it print the secret data?

I hope this isn’t a stupid question but I was just curious and didn’t know how to test it by myself.

1 Like

No It is not viewable by users that do not have access to the repl. I made a setup the same as yours (but in JS) and I see 555 as the output when I look on my main but undefined when looking on an alt. I used this repl

1 Like

I would assume if you forked it, the secret environment variables are not copied as well, and if you just copy it, you’d be referencing a variable that doesn’t exist.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.