-
Notifications
You must be signed in to change notification settings - Fork 6
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
how are we gonna handle authentication? #10
Comments
I think that Scratch Auth is the obvious choice. The |
but, even with ScratchAuth, we can't do social actions on behalf of the user like posting on the forums. that's what I meant. |
Oh, yeah, that's a problem. Hm... |
For now, since servers are all locally hosted, it should be fine if someone put in there password and username like normal. That will become a problem once there's public server's though. |
What about summoning a Scratch login pop-up, and when the user logs in, extracting the sessionId cookie? |
That sounds a little shady. I don't want to do that. |
Yeah, I don't know what I was thinking. |
not feasible |
REOPEN DESCRIPTION (ISSUE IMPORTANT) We can have the user enter their password and then authorise it by randomly generating a 256-bit random hash which they type into their profile's comments. Else, they can type it into a cloud project which gets accessed by Snazzle to verify and let through the user. The user's password can then be stored to allow future login. |
How does that give the user the "WeWontStealYourPassword™" feeling? |
Uhhhh maybe not enter your scratch password? |
This comment was marked as outdated.
This comment was marked as outdated.
why would we need to verify it..? i'm assuming you havent read this issue, since it is about being able to authenticate with the APIs. you'd need to enter your password for that, which is why a public instance is an inherently flawed idea if we want social actions (without the possible extension i mentioned, but that would get us a swift ban from being mentionable on scratch). |
the api doesn't have anything to check passwords, BUT we could make it so that once you enter the password, it will log you out currently, log you in again on scratch if password is correct and also log you in on snazzle? or you could just, ya know make a auth of our own with some auth method |
IDEA: We check the IP Address of a computer and match that to the IP of a Scratch Account |
Uhm, there's no way of logging out with the API on specific locations, and the idea of this is to be able to perform social actions from Snazzle, and that forcefully requires you entering your password.
There's no way of doing that since Scratch doesn't store IPs. Also, this could be risky since IPs are not unique identifiers. |
@NotFenixio new ideas IDEA 2: We send an email to their email address to verify the login. (Permanent login until logout) IDEA 3: We send a code to their email and let that IP be logged-in for 6 months. |
How do we get the user's email address? Also I think you keep misunderstanding. Yes, there are many ways of verifying the user's identity, like Scratch Auth/Oauth, the ways you said, and others, but what we need is a way to log in into the user's account in order to perform social actions like commenting, posting, sharing projects, etc. That isn't possible without getting the password. |
OHH I was misunderstanding. I mean are Scratch social actions session-based? So we could get the session ID and then use the ID to perform social actions. Or, a proxy by using the password to login and then something??? I'm all out of ideas. I'm posting a thread in the AT's for this (using API to perform social actions) |
Yep lol |
Also, if anyone asks why did i reopen this, well authentication is an important thing alright. |
UPDATE: AHypnoman on scratch has given some Node.js code to perform social actions. First, what Scratch T&C's say about these bots:
The code by AHypnoman on scratch is available on https://scratch.mit.edu/discuss/topic/751964/?page=1#post-7899193 and below
|
Also, can we invite @ahypnoman to join authentication of this? |
Oh sure, I'll invite him |
or them, I don't know |
Great!
It's a he. |
i've renamed this back since the original question in OP still hasn't been answered. so we can use the scratch APIs, do we:
|
I had a neat idea for this. Maybe it could be integrated with Scratch Addons, so if you use Scratch Addons, it could use your session ID from that to log you in? I wonder if mentioning Scratch Addons in Snazzle would get us banned from Scratch, however. (Not in the Scratch forum post, I mean in Snazzle itself.) |
nahh, we let them login with their password and get banned from scratch |
Idea! (inspired by @EngineerRunner ) Create a browser extension which is available on the Chrome Web Store called Snazzle Log-In, which accesses a session-id from Scratch continuously. This session-id is then sent to Snazzle's webapp or whatever platform app at this point and gets a log in, WITHOUT HAVING TO TYPE IN ANYTHING!! |
would get us instantly banned from being mentioned on scratch |
rip. We could try and make a login-password type thing and get Scratch's Stamp of Safety™ on it. |
that will never happen for multiple reasons |
We could always try? There is a chance if ST's mood is good and other stuff? |
|
|
Asking for the session token isn’t as bad as a password but it still has most of the same problems |
We could, as mentioned, somehow integrate this with Scratch Addons, that's already banned from Scratch, and we could just not mention how we implemented login when posting about it on the Scratch website :P |
The only way to add commenting, favoriting projects, and similar actions is to have the user's password or session id. It is possible to grab a session id with a browser extension, but we would probably want our own browser extension (I can create one if needed). Once we have the session id or password, the best way to interact with the Scratch website is probably through scratchattach. If we just want to get the username of a user (this will not allow for commenting and similar actions), the best option would be Scratch Auth. It is simple and secure. |
We are wanting all Scratch features, so scratchattach would be the way. Since Snazzle is already primarily written in Python, it would be easy to integrate scratchattach. The Dazzle dependencies library could add scratchattach features, and the main Snazzle code could be modified to include all of those featues. |
Then now the question is: Do we use ask the user for their username and password, or do we use a browser extension? |
We don't need it. It's just a bunch of API calls anyway, and we could integrate it into Dazzle. Plus, scratchattach relies on ScratchDB for some things. |
Browser extension just seems like an additional problem for us, so username and password would be the way to go. However, if we could manage to integrate Scratch Addons with Snazzle, it would let us login without getting banned from Scratch in theory. |
Once we get Voyager out eventually, we could ask TimMcCool to migrate from ScratchDB to Voyager. It would be beneficial for everybody to use Voyager. |
I'd prefer not to depend on scratchattach because we already have Dazzle. Also the last commit on Voyager was 2 months ago, so we need to accelerate its development or it will never be available for us (or others) to use. I think we should all focus on Voyager for the time being until it can really compete with ScratchDB in terms of features. |
I disagree. Scratchattach would be very useful for interaction with the scratch website. It handles all authentication and POST requests needed (why try to reinvent the wheel?). It also only uses ScratchDB for forums and leaderboards as far as I know, so it wouldn't break anything that isn't already broken. Also, we can pick and choose when and when not to use it; we could still use Voyager for the forums. |
i feel like this whole this thread was just more focused on what to use and not how to authenticate |
the only cat meme with help plz i could find lmao |
i meant what help you needed with voyager? |
I dunno, just something about using a library like that irks me, but I have realized that it could be better. |
Oh, sorry. Well, if anyone could add category linking it'd be of great help. Somehow my Git installation broke and I can't be bothered reinstalling it right now. This should be pretty straightforward:
|
if we want to add uploading, leaving comments, changing profile picture, we need to be able to log somebody into scratch's api. but how will that integration work? we'd have to:
The text was updated successfully, but these errors were encountered: