Skip to main content

Google OpenID integration for FastAPI

Project description

fastapi-openid-google

Google OpenID integration for FastAPI.

Usage

import fastapi

from fastapi_openid_google import setup_openid

app = fastapi.FastAPI()
setup_openid(app)


@app.get("/")
def home(
    request: fastapi.Request,
):
    if request.state.user:
        return {
            "current_user": request.state.user,
            "logout": f"/logout",
        }
    else:
        return {"login": f"/login"}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastapi_openid_google-0.0.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

fastapi_openid_google-0.0.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_openid_google-0.0.0.tar.gz.

File metadata

  • Download URL: fastapi_openid_google-0.0.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for fastapi_openid_google-0.0.0.tar.gz
Algorithm Hash digest
SHA256 65abb1f034b21b0745ae06720b45dd65c98bac5f3a470c82e3aa72fde1f94967
MD5 2adaca2bdf2c213832a84587b18f608c
BLAKE2b-256 1a0fdfd9a485f0998cadad2da179a4077e5a0cdb18e7cb4254c303adc2a6d22c

See more details on using hashes here.

File details

Details for the file fastapi_openid_google-0.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for fastapi_openid_google-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 392035ec2dd6af4fc1f3ed201e7b70608838c21aff290bdc2cd6f38dddeaac45
MD5 5fe1eba83242958e6b20371b2a2dca1c
BLAKE2b-256 4200f5286350a5a04f3c39ba2a4aaf9515f8cf26ebecc208ed6af1f7827c1c30

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page