How to protect the password for the admin login in my .json folder

Project URL: https://kg-agario.glitch.me
I have a game site that uses a .json file to store the password for the admin login. I have been using .gitignore for the past month to hide it but recently someone has been remixing the project and revealing the password in chat and abusing the admin rights which only I should have. I have been searching for a way to prevent them from being able to see the password but haven’t been able to figure out how to do so. I have tried looking into .env and .data but don’t understand how to use them. Can anyone help me? (Looking for a solution as soon as possible thanks!)

1 Like

Hi @Kronos8008, in case you haven’t seen our help doc about secrets, it goes a bit into how to use .env: How do I store secrets, credentials or private data? - Glitch Support

3 Likes

@jenn I saw that but couldn’t quite get that to work for my project. I’m open to letting someone look at my code and tell me how to implement the environmental variables though. :grinning:

What language are you using?

2 Likes

It looks like you are using node, you are going to have to tweak the argario code to not pull variables from the json file and instead the .env file.

2 Likes

@RiversideRocks OK, how do I copy what’s in the json file over to .env? Thank you for the help btw!

@Kronos8008 Which languages do you program in?

Looks like you remixed mk-agars old agario client. I can help you update that if you want. Also many people have been botting on your server. If you want me to change the agar protocol, I can do that for u also.

Please look at the date of the last post on a topic before replying, if it’s older than a month the original poster has most likely solved their problem, given up, or found a workaround

1 Like

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