Django GraphQL Auth¶
Django registration and authentication with GraphQL.
Demo¶
About¶
Abstract all the basic logic of handling user accounts out of your app, so you don't need to think about it and canget 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'seasy to extend or switch to your implementation.
Features¶
- Awesome docs!
- Fully compatible withRelay
- Works withdefault or custom user model
- JWT authentication(withDjango GraphQL JWT)
- User query with filters(withDjango Filter andGraphene Django)
- User registration with email verification
- Add secondary email, with email verification too
- Resend activation email
- Retrieve/Update user
- Archive user
- Permanently delete user or make it inactive
- Turn archived user active again on login
- Track user status(archived, verified, secondary email)
- Password change
- Password reset through email
- Revoke user tokens on account archive/delete/password change/reset
- All mutations return
successanderrors - Default email templates(you will customize though)
- Customizable, no lock-in
- Passwordless registration
Example¶
Handling user accounts becomes super easy.
mutation{register(email:"new_user@email.com",username:"new_user",password1:"123456super",password2:"123456super",){success,errors,token,refreshToken}}
Check the status of the new user:
u=UserModel.objects.last()u.status.verified# False
During the registration, an email with a verification link was sent.
mutation{verifyAccount(token:"<TOKEN ON EMAIL LINK>",){success,errors}}
Now user is verified.
u.status.verified# True
Check theinstallation guide or jump to thequickstart. Or if you prefer, browse theapi.
