Skip to main content

Simple OIDC integration for FastAPI using Authlib

Project description

fastapi-oidc

A lightweight OpenID Connect (OIDC) integration for FastAPI, built on top of Authlib.
It provides simple routes for OIDC login, callback, and user info, along with dependency helpers to protect endpoints and enforce group-based access.


✨ Features

  • 🔑 Easy OIDC integration with FastAPI
  • 🔗 Built-in routes for /auth/login, /auth/callback, and /auth/userinfo
  • 🛡️ Dependency helpers:
    • require_oidc → protect endpoints with authentication
    • require_oidc_group("group") → enforce group-based authorization
  • 🧩 Uses Authlib’s discovery-based OIDC client
  • ⚡ Minimal setup: just plug it into your FastAPI app

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_oidc_simple-0.1.2.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastapi_oidc_simple-0.1.2-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_oidc_simple-0.1.2.tar.gz.

File metadata

  • Download URL: fastapi_oidc_simple-0.1.2.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.22

File hashes

Hashes for fastapi_oidc_simple-0.1.2.tar.gz
Algorithm Hash digest
SHA256 efe6f59490f0e48e3cc82ebdbb1fcacd503547a00b7186415094c25fc47ede84
MD5 f57634a4f5507f706b7472d051749fde
BLAKE2b-256 b2ae88da0a1ce0973946bba87667bff1a45212a15703b5e113c971100012cae6

See more details on using hashes here.

File details

Details for the file fastapi_oidc_simple-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for fastapi_oidc_simple-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 87f2f1b835a5e8335e6f37dc703fd393af4ec7730cd837b2bc07cc8a19ec4d8d
MD5 5facfb58b4ceb14a3bb41c80e61fac68
BLAKE2b-256 1fa063d4ebc5ae89585901297004bfbc41c11aa4bb937dda9e2f23da4490e7a4

See more details on using hashes here.

Supported by

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