huychau/drf-registration

i want to use email rather than username in login is it possible

Closed this issue · 1 comments

i want to use email rather than username in login is it possible

Hi @ManojDjs By default, you can log in by username and email. If you want to use only email, you can config LOGIN_USERNAME_FIELDS to ['email',]:

DRF_REGISTRATION = {
    ...
     'LOGIN_USERNAME_FIELDS': ['email',]
   ...
}

This package support multiple fields to login. Make sure your fields have a unique value. Read more at https://drf-registration.readthedocs.io/en/latest/settings/login.html