Skip to content

this project exists to demonstarte how to create user authentication and permissions in django rest framework using djoser and simple jwt.

Notifications You must be signed in to change notification settings

hengage/djoser-and-simple_jwt-user-auth-api

Repository files navigation

djoser-and-simple_jwt-user-auth-api

This project exists to demonstrate how to create, customize user authentication and permissions in django rest framework using djoser and simple jwt.

LIve LInk: https://djoserauthapi.herokuapp.com


I used a custom User serializer for user registration and read user in the settings, but every other thing comes from djoser's default serializer

Djoser settings where i configured my desired serializers

image


Since this is an app to show how to use djoser together with simple jwt, simple-JWT is use for token generation and refresh In settings.py


SIMPLE_JWT = {
   'AUTH_HEADER_TYPES': ('JWT',),
}


Features user account activation via email using a token and uid. this needs a template on the frontend but since it is just an api, this can be done with postman as shown in the screenshot below image

The UID and token are sent to the requesting user's email as an activation link which should normally lead to a frontend page, but as I mentioned earlier, does not, due to the focus of this project. Hence can be demonstrated as shown above

For the documentation schema, drf-yasg was used

About

this project exists to demonstarte how to create user authentication and permissions in django rest framework using djoser and simple jwt.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published