# Create a Flask Application With Google Login

DevFeed: [Create a Flask Application With Google Login](<https://devfeed.tech/articles/create-a-flask-application-with-google-login-100530.md>)

Original publisher: [Read original article](<https://realpython.com/flask-google-login/>)

Author: Alexander VanTol

Published: 2026-10-26T14:00:00Z

Content type: tutorial

Language: en

Sources: [Real Python](<https://devfeed.tech/sources/real-python.md>)

Topics: [OpenID connect (OIDC)](<https://devfeed.tech/topics/oidc.md>), [Flask](<https://devfeed.tech/topics/flask.md>), [Single sign-on (SSO)](<https://devfeed.tech/topics/sso.md>), [Google](<https://devfeed.tech/topics/google.md>)

Tags: [flask](<https://devfeed.tech/tags/flask.md>), [google](<https://devfeed.tech/tags/google.md>), [google-account](<https://devfeed.tech/tags/google-account.md>), [login](<https://devfeed.tech/tags/login.md>), [oauth](<https://devfeed.tech/tags/oauth.md>), [openid-connect](<https://devfeed.tech/tags/openid-connect.md>), [python](<https://devfeed.tech/tags/python.md>)

## AI overview

The example Flask app uses Google's OpenID Connect flow to authenticate users and Flask-Login to maintain their browser sessions, so the app does not store passwords. After registering a Google web client and configuring its ID and secret as environment variables, the app requests the `openid`, `email`, and `profile` scopes. It exchanges the returned authorization code for tokens, retrieves profile data, checks `email_verified`, stores the user's Google ID, name, email, and picture in SQLite, and logs them in. The excerpt uses `oauthlib` with `requests` for the OAuth/OIDC requests and notes that its provider-configuration and API calls need stronger error handling for robustness. Local testing uses Flask's development server with an ad hoc HTTPS certificate, which triggers a browser warning; the article suggests a real certificate for deployment.

## Source excerpt

Build a Python Flask app with Google login so users can sign in with their Google account, and learn OAuth 2, OpenID Connect, and Flask-Login.