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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65abb1f034b21b0745ae06720b45dd65c98bac5f3a470c82e3aa72fde1f94967 |
|
MD5 | 2adaca2bdf2c213832a84587b18f608c |
|
BLAKE2b-256 | 1a0fdfd9a485f0998cadad2da179a4077e5a0cdb18e7cb4254c303adc2a6d22c |
File details
Details for the file fastapi_openid_google-0.0.0-py3-none-any.whl
.
File metadata
- Download URL: fastapi_openid_google-0.0.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 392035ec2dd6af4fc1f3ed201e7b70608838c21aff290bdc2cd6f38dddeaac45 |
|
MD5 | 5fe1eba83242958e6b20371b2a2dca1c |
|
BLAKE2b-256 | 4200f5286350a5a04f3c39ba2a4aaf9515f8cf26ebecc208ed6af1f7827c1c30 |