Skip to main content

A production-ready social authentication solution for Django REST Framework with provider abstraction, account linking, configurable security settings, and seamless JWT integration.

Project description

django-social-auth-rest

Social login for Django REST Framework - with account linking, JWT tokens, and room to grow.

Python 3.12+ Django 5.0+ License: MIT

Read the full docs →

What This Does

django-social-auth-rest lets your users sign in with their social accounts (Google, GitHub, etc.) and returns JWT tokens your frontend can use right away. It also handles connecting and disconnecting those social accounts after the fact.

Currently supported providers: Google, GitHub More providers are coming soon.

Features

  • Sign in with socail accounts (like google, github) - get back JWT access and refresh tokens
  • Link or unlink social accounts from an existing user profile
  • See which providers a user has connected
  • CSRF protection via signed OAuth state tokens
  • Rate limiting on all auth endpoints
  • Optional support for soft-deleted user accounts
  • Signals you can hook into for things like welcome emails or analytics

Requirements

  • Python 3.12+
  • Django 5.0+
  • Django REST Framework 3.15+

Install

pip install django-social-auth-rest

For setup, provider credentials, the API reference, and signals, see the documentation site:

Contributing

Contributions are welcome. If you find a bug or want to suggest an improvement, please open an issue first so we can discuss it.

More authentication providers are planned - if you'd like to add one, open an issue to coordinate.

License

MIT - see LICENSE for details.

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

django_social_auth_rest-2.0.3.tar.gz (3.1 MB view details)

Uploaded Source

Built Distribution

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

django_social_auth_rest-2.0.3-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

Details for the file django_social_auth_rest-2.0.3.tar.gz.

File metadata

  • Download URL: django_social_auth_rest-2.0.3.tar.gz
  • Upload date:
  • Size: 3.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for django_social_auth_rest-2.0.3.tar.gz
Algorithm Hash digest
SHA256 ddc121a86b2c31e9987dd67c21e2e70c01f6d32954b65b15e82bac8a3773ad9c
MD5 4435a624292004116a30b86c96c4a7c1
BLAKE2b-256 1f252f32449eaf1f273c5208385a51a5c4f3b2f4e49fd2af864980597c3f161f

See more details on using hashes here.

File details

Details for the file django_social_auth_rest-2.0.3-py3-none-any.whl.

File metadata

  • Download URL: django_social_auth_rest-2.0.3-py3-none-any.whl
  • Upload date:
  • Size: 21.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for django_social_auth_rest-2.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5399f0472a656b82f1fefebc1cb624ad5fd333308343b48020d0ec41f4df5802
MD5 7ee7bf6180d2e6e22ad6c78fd9ff63d6
BLAKE2b-256 0e92d51ad96f8abc4c7ce617aae7916e9b80fe62c246ef957a54c42f39cb18c1

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