This post explains how to add Google Oauth2 login in a Flask web app using the requests-oauthlib package for OAuth 2.0 and flask-sqlalchemy . To get started, first we have to create a project in Google Developers Console to get client key and secret. Creating a Google project First go to Google Developers Console . Sign in using your Google credentials if you haven’t already. There will be a list of projects(if you have previously created any). Click on Create Project to create a new project. Provide a project name in the dialog box and press enter. For explanation purposes, lets say the project name is test-project-123xyz . test-project-123xyz will appear in the list of projects after creation. Now go to the project page. Click APIs and Auth -> Credentials in the sidebar. Then goto the OAuth Consent Screen . Provide the Product Name (you can also provide other deta...
Hi, I’m Deepak Dubey. The founder of this blog. I’m a Full-stack Python Developer | OpenedX professional and part-time blogger. I’m here to write the blogs related to technology stuff like Python, Django , Open-edX, Data Science, machine Learning and many more.