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.1.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.1-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fastapi_oidc_simple-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 8f84c1cc7f0b2b7993e836361648a938c5d9c6e2dfde31bba1ed16814668ae0b
MD5 69689ff75c19bde79904fb7b8a5b3482
BLAKE2b-256 6a85605a7560493265dcfdc629e23b8a8b4431ef2317ca703a58aaff6c103e56

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastapi_oidc_simple-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 92a52f62b2d2e294866d3cceac23c98f7d01f46e1c6c33c478519d6d75cf579a
MD5 adf685562bc28bbe335b5b09f2964b6f
BLAKE2b-256 2b333541a77afa51d5814e6af0dd72309e55374bd8cd04460db6b7e11c1086e5

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