Skip to main content

Graphql authentication system with Strawberry for Django.

Project description

Tests Codecov Pypi contributions welcome Pypi downloads Python versions

Strawberry-django Auth

Django registration and authentication with Strawberry.

Demo

Demo Video

About

This Library was inspired by Django-graphql-auth.

Abstract all the basic logic of handling user accounts out of your app, so you don't need to think about it and can get you up and running faster.

No lock-in. When you are ready to implement your own code or this package is not up to your expectations , it's easy to extend or switch to your implementation.

Docs can be found here

Features

  • Awesome docs!
  • Captcha validation (with extra strawberry-django-auth[captcha])
  • Async/Sync supported!
  • Works with default or custom user model
  • Builtin JWT authentication using PyJWT
  • User registration with email verification
  • Retrieve/Update user
  • Archive user
  • Permanently delete user or make it inactive
  • Turn archived user active again on login
  • Track user status (archived, verified)
  • Password change
  • Password reset through email
  • Revoke user tokens on account archive/delete/password change/reset
  • All mutations return success and errors
  • Default email templates (you will customize though)
  • Customizable, no lock-in
  • Passwordless registration

Full schema features

@strawberry.type
class Mutation:
    verify_token = mutations.VerifyToken.field
    update_account = mutations.UpdateAccount.field
    archive_account = mutations.ArchiveAccount.field
    delete_account = mutations.DeleteAccount.field
    password_change = mutations.PasswordChange.field
    swap_emails = mutations.SwapEmails.field

    # these are mutation that does not require authentication.
    captcha = Captcha.field
    token_auth = mutations.ObtainJSONWebToken.field
    register = mutations.Register.field
    verify_account = mutations.VerifyAccount.field
    resend_activation_email = mutations.ResendActivationEmail.field
    send_password_reset_email = mutations.SendPasswordResetEmail.field
    password_reset = mutations.PasswordReset.field
    password_set = mutations.PasswordSet.field
    refresh_token = mutations.RefreshToken.field
    revoke_token = mutations.RevokeToken.field
    verify_secondary_email = mutations.VerifySecondaryEmail.field


schema = strawberry.Schema(query=Query, mutation=Mutation)

Contributing

See CONTRIBUTING.md

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

strawberry_django_auth-0.379.1.tar.gz (6.9 MB view details)

Uploaded Source

Built Distribution

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

strawberry_django_auth-0.379.1-py3-none-any.whl (477.5 kB view details)

Uploaded Python 3

File details

Details for the file strawberry_django_auth-0.379.1.tar.gz.

File metadata

  • Download URL: strawberry_django_auth-0.379.1.tar.gz
  • Upload date:
  • Size: 6.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","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 strawberry_django_auth-0.379.1.tar.gz
Algorithm Hash digest
SHA256 7f4f00bb041ab4d77312a870a5f6a65ddde541ceb164865310564f14d39abc49
MD5 38c5da8f582d08e50bd68eb6f98674a5
BLAKE2b-256 e33c4a5c8ae4682b749e1f23fbfffe343c0d581b99c3ef3a7660021c88435d7c

See more details on using hashes here.

File details

Details for the file strawberry_django_auth-0.379.1-py3-none-any.whl.

File metadata

  • Download URL: strawberry_django_auth-0.379.1-py3-none-any.whl
  • Upload date:
  • Size: 477.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","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 strawberry_django_auth-0.379.1-py3-none-any.whl
Algorithm Hash digest
SHA256 beba63405c700aab16279f081c19b097dfd5cbe71bcd716a8bfaa9c39ceb2146
MD5 c3a61236084aa7f9bc643bc1e34e1d52
BLAKE2b-256 90c13ff537fd9d60b9f70a9915105460c762c2dc5283abd51542eeadc69a3add

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