Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable salt login #48

Open
89891383 opened this issue Jan 22, 2024 · 5 comments
Open

disable salt login #48

89891383 opened this issue Jan 22, 2024 · 5 comments

Comments

@89891383
Copy link

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".

@RblSb
Copy link
Owner

RblSb commented Jan 22, 2024

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.

@89891383
Copy link
Author

ohhh.. yes login admin, but i dont have CLI

@RblSb
Copy link
Owner

RblSb commented Jan 23, 2024

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.

@89891383
Copy link
Author

89891383 commented Jan 24, 2024

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?

@RblSb
Copy link
Owner

RblSb commented Jan 24, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants