python-aternos icon indicating copy to clipboard operation
python-aternos copied to clipboard

Add support for Google Login

Open flancast90 opened this issue 2 years ago • 6 comments

As the title implies, an auth flow using Google would be beneficial for google-using clients.

flancast90 avatar May 16 '22 23:05 flancast90

Hello.
It's too hard or impossible because of OAuth security.

DarkCat09 avatar May 17 '22 11:05 DarkCat09

I'll appreciate if you help me with this feature.

DarkCat09 avatar May 17 '22 11:05 DarkCat09

Hello. It's too hard or impossible because of OAuth security.

Not really. Google App Passwords allow a simple username/password login without disabling the Secure Apps features. I think the hard part will be determining the token Aternos uses for the Google Login. However, if they keep you logged in, you could attempt a normal OAuth flow, and then see if it's persistent across Aternos.

flancast90 avatar May 17 '22 12:05 flancast90

determining the token Aternos uses for the Google Login

Aternos' backend is not open-source.
It doesn't provide any ajax API for logging in with Google.

While the feature is not implemented, use Client.from_session specifying ATERNOS_SESSION cookie as an argument.

DarkCat09 avatar May 17 '22 17:05 DarkCat09

Aternos' backend is not open-source. It doesn't provide any ajax API for logging in with Google.

Yes, but the args are passed to Google via URL to open the google signin window. If you could determine the token for Google signin, you could use the standard Google OAuth library without any need for Aternos' backend.

flancast90 avatar May 17 '22 18:05 flancast90

Google Sign-in Button href: https://aternos.org/auth/google-login

Redirects to https://accounts.google.com/o/oauth2/auth/oauthchooseaccount?response_type=code&access_type=online&client_id=853067141497-24lhsecgk8lm86qat7nolobpn791o2r6.apps.googleusercontent.com&redirect_uri=https://aternos.org/auth/google-login&state=...&scope=https://www.googleapis.com/auth/userinfo.email&approval_prompt=force&flowName=GeneralOAuthFlow

client_id=853067141497-24lhsecgk8lm86qat7nolobpn791o2r6.apps.googleusercontent.com redirect_uri=https://aternos.org/auth/google-login

TheRedstoneRadiant avatar Oct 03 '22 01:10 TheRedstoneRadiant