DRF boilerplate for user registration and auth using phone number and/or email

Hana Belay - Aug 22 '22 - - Dev Community

Hello everyone, I'm back with a boilerplate project that has saved my time and will hopefully save yours too.

Developers often don't want to take part in the hassle of setting up an authentication system every time a new project is started. I would rather find a boilerplate or package that accomplishes this task (I'm sure I speak for a lot of us by saying this). However, different projects require different ways to authenticate users. Some require email, others phone number, and finding that "perfect" boilerplate for our project can be a difficult task.

There are a lot of boilerplate projects for the default username-based authentication in Django, as well as email authentication. It's fairly easy to customize our Django project to use email instead of username for auth. However, I've not come across a boilerplate that satisfies my requirements for an authentication system using phone number and/or email together with verification. Even if they do, they are not up-to-date.

And I use a combination of the two (phone number and email) mostly in my projects, which is why I decided to create this boilerplate. I've used dj-rest-auth package, a fork of the no longer maintained, django-rest-auth package. I've also included third-party authentication using Google, password change, and reset endpoints. For phone verification I've used Twilio.

Let me know your feedback and anything you would like to see fixed about the project.

I hope this is something will find useful for your next project with room for customization. If you like it, don't forget to leave a star on GitHub.

till next time

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player