Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE-REQUEST] Allow login via email and username #123

Open
mukul-mehta opened this issue Jan 2, 2020 · 3 comments
Open

[FEATURE-REQUEST] Allow login via email and username #123

mukul-mehta opened this issue Jan 2, 2020 · 3 comments

Comments

@mukul-mehta
Copy link
Member

As of now, we only let a user log in using email but we should let a user login through username as well.
It should be a straight forward job adding this feature.

@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.99. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@agarwalBinay18
Copy link

hey i want to work on this issue

@thealphadollar
Copy link
Collaborator

Hey @agarwalBinay18 that is so amazing.

This is the line (

@api.route('/login')
) where we accept the request on the /login endpoint. It currently uses the user_auth (
user_auth = api.model('auth_details', {
) structure to accept request. Adding a new field of username and making either email or username necessary can be a good first step.

Thereafter you need to modify the login function which compares email and password and use a OR statement to also allow username.

Please feel free to ask more questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants