Using Google Login With Flask (Summary)
In this course, you’ve gone through the basics of OAuth 2 and OpenID Connect. You’ve seen how to use well-known Python packages to create a web application that allows users to log in with their existing Google account. Most importantly, you have example code that serves as a great starting point for your next web application!
The application you made in this article is a great starting point. Your next step could be to do the following:
- Rework the database initialization to happen separately from running the application
- Separate out the HTML/CSS from the Python code for easier management:
- You could use templates.
- You could also load static files (like JS and CSS) from elsewhere.
- Host your application in the cloud
- Purchase a domain name
- Use a real SSL certificate and get rid of that pesky warning
Congratulations, you made it to the end of the course! What’s your #1 takeaway or favorite thing you learned? How are you going to put your newfound skills to use? Leave a comment in the discussion section and let us know.
00:00
Now, the demo app may seem a little underwhelming, but think of all the things you didn’t have to do. Also, what you saw in this course is not specific to Flask. The packages requests
and oauthlib
are valid in any Python web app using any framework.
00:14 Flask was just the easiest one to get up and running with.
00:18 Here’s some suggestions for next steps to expand and improve the demo app: remove the HTML from the Python code and use templates to make the presentation easier to manage; deploy the application to a server or host in the cloud; register a real SSL certificate to eliminate the security warning; set up a domain name.
00:40 Thanks for watching this course. I hope it was helpful. Let me know if you have any questions. Now, go build something awesome.
Become a Member to join the conversation.