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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for strawberry_django_auth-0.378.4.tar.gz
Algorithm Hash digest
SHA256 40bf6041507118b213d67e763f813219285be3c0f677aa4b869eb7df962a0f2c
MD5 ec7643bd7e3cd0ae2f5619e34b8cec15
BLAKE2b-256 cb2779bb9c0c00db1b5ead8460c017b7cda1af2a8a516ea1e6a9b40095a66ef9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for strawberry_django_auth-0.378.4-py3-none-any.whl
Algorithm Hash digest
SHA256 dd0ea04312ef969aafdcbc2d6f4be9af883ae38d0e717d32ca1983a9c91887ac
MD5 155772546fb94764226c8f395a2a235c
BLAKE2b-256 da4cec0026f42e3b91cf46b2fa1cc7f3e8ae98887251a70bbc00621e0d182baa

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