Open Manan-Arora31 opened 10 months ago
@kunal2812 Sir in the models the username field is set to email . And the model takes nothing else to be considered as username . I tried with firstname but authentication doesn't work with it . I have done rest of the changes in views and html
You have to enable username sign-in. Email signin is already enabled.
@kunal2812 Yes sir, but for that a username field should be there in the model. But there isn't any
@kunal2812 Yes sir, but for that a username field should be there in the model. But there isn't any
That's what you have to do. Add the field.
@kunal2812 Here User can login either using email or firstname. Firstname is used instead of username because username entered by the user in sign up form isn't saved in the model. So, it might confuse the user to ask for username. If they enter that username in sign in form, since no such field is present in the model ( because email is used as username field so another can't be made), the user can't be authenticated.
@kunal2812 Here User can login either using email or firstname. Firstname is used instead of username because username entered by the user in sign up form isn't saved in the model. So, it might confuse the user to ask for username. If they enter that username in sign in form, since no such field is present in the model ( because email is used as username field so another can't be made), the user can't be authenticated.
You have to take the username during the signup and save it to user model. Then after that you have to enable username authentication. Auth via First Name is senseless since many users can have same First Name
@kunal2812 Sir I have made the changes . Please check .
Have you tested the code? It doesn't seem to be working at all.
Description
Added the functionality of username login to aid the users.
Related Issue
Fixes #15 (issue)
Type of change
Motivation and Context
To improve the feature of user login.
How Has This Been Tested?
It has been tested by running on my local machine
Screenshots (if appropriate):
Checklist:
Test Configuration: