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

added frontend support for username #882

Merged
merged 7 commits into from
Jul 19, 2020

Conversation

Dishebh
Copy link
Member

@Dishebh Dishebh commented Jun 27, 2020

Fixes #878

Copy link
Member

@divyanshu-rawat divyanshu-rawat left a 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.

@Dishebh Dishebh requested a review from divyanshu-rawat June 27, 2020 19:33
Copy link
Member

@Marvin9 Marvin9 left a 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,

  1. return username as well inside signUpRequest.
  2. Inside sagas.ts(in same folder), destruct username & pass it along with email, password inside call.
  3. In ignitus-Api/index, add username as argument & axios post body. [Make sure arguments order of step 2 & 3 are same].

Learn basic redux-saga concepts to get the flow.

@Dishebh Dishebh requested a review from Marvin9 June 30, 2020 06:34
@Dishebh
Copy link
Member Author

Dishebh commented Jul 3, 2020

How should I enable the support for both email and userName during SignIn in frontend?
@Marvin9 @divyanshu-rawat

@divyanshu-rawat
Copy link
Member

@divyanshu-rawat just read how email & password is being sent to server from front-end :)

@Dishebh
Copy link
Member Author

Dishebh commented Jul 10, 2020

@divyanshu-rawat there should be a more optimized way of doing it. Please review the changes done now. Thanks

@Marvin9
Copy link
Member

Marvin9 commented Jul 13, 2020

@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');
Copy link
Member

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.

@divyanshu-rawat divyanshu-rawat merged commit 1f91118 into Ignitus:develop Jul 19, 2020
@Dishebh Dishebh deleted the username branch July 20, 2020 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants