Skip to main content

django-sabia-auth

PyPI Version PyPI version Tests Coverage Python CI and PyPI Deploy Python Versions Django Versions Django Versions License: MIT

Django OAuth2 authentication backend for Sabiá, Brazil's SUS (Sistema Único de Saúde) identity provider, hosted at login.sabia.ufrn.br.

Installation

pip install django-sabia-auth

Configuration

Add to INSTALLED_APPS and configure settings:

INSTALLED_APPS = [
    ...
    "django_sabia_auth",
]

AUTHENTICATION_BACKENDS = [
    "django_sabia_auth.backends.SabiaAuthBackend",
    "django.contrib.auth.backends.ModelBackend",
]

SABIA_CLIENT_ID = "your-client-id"
SABIA_CLIENT_SECRET = "your-client-secret"
SABIA_REDIRECT_URI = "https://yourapp.example.com/auth/sabia/callback/"
SABIA_SCOPES = ["cpf", "email"]  # optional, these are the defaults
LOGIN_REDIRECT_URL = "/dashboard/"
LOGIN_URL = "/login/"

URL Setup

# urls.py
from django.urls import path, include

urlpatterns = [
    path("auth/sabia/", include("django_sabia_auth.urls")),
    ...
]

Usage

Add a login button to your template:

<a href="{% url 'sabia_auth:login' %}">Login with Sabiá</a>

Documentation

Full documentation is available in the docs/ directory.

Sabiá Developer Portal

For API credentials, visit the Sabiá developer page.

License

MIT © 2026 kelsoncm

Metadata

Release files for django-sabia-auth 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-sabia-auth 1.1.0
File Size Uploaded Provenance
django_sabia_auth-1.1.0.tar.gz 13.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-sabia-auth 1.1.0
File Interpreter ABI Platform
django_sabia_auth-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 24.2 kB

Release files / django_sabia_auth-1.1.0.tar.gz

Download URL django_sabia_auth-1.1.0.tar.gz
Size 13.5 kB
Tags Source
SHA-256 checksum
How to use checksums
622dc693e92cf7cf61c3258692187ce959f5f45a877ad6cd56a2fdf69df412bf
BLAKE2b-256 checksum
How to use checksums
6df504192ca2ef8691736eced63efdfa940efbdb8a0908d354a7553183d0e338
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 23, 2026.

Transparency log

Release files / django_sabia_auth-1.1.0-py3-none-any.whl

Download URL django_sabia_auth-1.1.0-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
110832375ca112abc04cdabe158a334798df6cc0074a7fbabb8f46ef9807054b
BLAKE2b-256 checksum
How to use checksums
2492c61787301729a056d2afcd51cf6f7d67ad2b8b86e3686b349d90712d8c8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 23, 2026.

Transparency log

Security for django-sabia-auth 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for django_sabia_auth-1.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page