-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
added frontend support for username #882
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UI looks good to me but functionally is still missing @Dishebh, feel free to trace back to the state that <Form />
component is receiving.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It still doesn't send username to server. To do that,
- return
username
as well insidesignUpRequest
. - Inside
sagas.ts
(in same folder), destructusername
& pass it along with email, password insidecall
. - In
ignitus-Api/index
, addusername
as argument & axios post body. [Make sure arguments order of step 2 & 3 are same].
Learn basic redux-saga concepts to get the flow.
How should I enable the support for both |
@divyanshu-rawat just read how email & password is being sent to server from front-end :) |
@divyanshu-rawat there should be a more optimized way of doing it. Please review the changes done now. Thanks |
@divyanshu-rawat Are we relying on front end to decide whether it is email or username? |
logInRequestUsingUsername(userName, password, 'professor'); | ||
setState(LoginStatePayload); | ||
} else { | ||
logInRequestUsingEmail({ email: userName }, password, 'professor'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will produce error everytime, as logInRequestUsingEmail
accept first argument as string.
Fixes #878