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.2.0.tar.gz (3.0 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.2.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fastapi_oidc_simple-0.2.0.tar.gz
  • Upload date:
  • Size: 3.0 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.2.0.tar.gz
Algorithm Hash digest
SHA256 61b973aa28417b4cac7bb279d1a473457c7fc50d75c6ea94ca641956bf8e53bd
MD5 12cbee1aa4650d0c6cd0d047a8b10798
BLAKE2b-256 97171429f30509305b18f5e796e2a3f7b29dcdbd0cf338e93650cc7bb9186697

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastapi_oidc_simple-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1ade71a992567b78b18c385cd952545d41ad619437e2abbe27a5af9b636d48ae
MD5 e8c152329ba17edf430a4bb76f8e942f
BLAKE2b-256 b51bd81753c2e0a24e0d27cb488e8070f66275882cae4ff156ccee53b83f1f87

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