Log in using Google (Python)

A computer logging in
Photo by Desola Lanre-Ologun on Unsplash

Hi everyone! Today I’m building a very simple library to log in using Google on a Python app.

I am doing this with the help of the 1auth platform (I built this platform) and some simple libraries: pyautogui, webbrowser, base64 and json. Here is a diagram so you can understand how it is built:

Figjam: Auth diagram (python)

So here’s the code:

Source code

Now this is only a starter code, you can host the JSON string in a file and, when the app is called, get the string and parse it. That would be better to the user:

Thank you for reading!

Need help? Just comment. Like this post? Give a clap! If possible, give 50!

--

--

Hi! I'm Tiago, a student at Lisbon, Portugal.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store