-
Notifications
You must be signed in to change notification settings - Fork 5
Home
Django restful API login with Email and Mobile no. In this, we get custom created authentication system. We can register with our mobile or email after register verification OTP sent to email and mobile. Both email and mobile have different OTP. so when the user inputs the OTP from email then email verified and if OTP input from mobile then mobile varified. The user also sent the resent OTP if mail or SMS not found.
When I started working on Django there is the only authentication using a username available. But these days when we use our rest API for Mobile devices or Web technologies like Angular, React it is very difficult to verify users. Then I decided to develop Django rest API with custom authentication, where users can login with email or mobile number. here users can pass Email or Mobile in a single Text box and the server detects and authorize. User Email or mobile verified with OTP and after successful verification user can login and get the token. The generated OTP only valid for some minutes which is configurable. For the generation of Authentication Token, I use the JWT library which is used for established authentication between a client (Mobile or Web) and severs (Backend Server).