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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for fastapi_oidc_simple-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8634860a869ecc2793f5e0280a35614ed617c60a25044572b06168949b897bf2
MD5 3b9f77ba6fa972e22b059ef7e76f5cc0
BLAKE2b-256 7ceef7d0f440982b1b2eaf232db9e585cb3243761ffb901f917b3df0f4332659

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