Open 89891383 opened 8 months ago
Do you mean admin login? Can you try creating an admin locally with access to the server CLI, and then commit the user/users.json file to render.com? Then your admin will have to stay between restarts. Or maybe I misunderstood your task.
ohhh.. yes login admin, but i dont have CLI
Are you sure you cannot install nodejs on your pc, open synctube project folder in terminal and run npm i ws
and then run it with node build/server.js
?
Then you will get access to /addAdmin
command in terminal and will add your admin to user/users.json
file, and then commit that file to render without problems.
If you cannot do that, i can provide you some custom instructions how to make that users.json
file with your admin and password, but you still will need to change it a little and then push to your render.com repo.
Yeah, if you can give me instructions, so far I have something like this in users.json
{
"admins": [
{
"name": "test",
"hash": "test"
}
]
}
the problem is that when I try to log in it shows me the wrong password - then I have to log in through devtools in local storage. Is there perhaps some other solution?
File like this is generated when you do /addAdmin
in server cli in and close server:
{
"admins": [
{
"name": "Moka",
"hash": "SOME_HASH"
}
],
"bans": [],
"salt": "9821079f7b9cf9bffacd5e06db534c549c7da9d1a2e41e14de63e4ea1685b9fc"
}
Here is generator to replace user SOME_HASH
, update name/password vars as you like, click Build and Run
and copy "hash"
value from output:
https://try.haxe.org/#8FC4a0fF
Then save json above as user/users.json
How to disable the need to have "salt"? because in render.com I do not have access to Shell, and there I only want to host synctube. I just want to be able to log in by "hash".