Undebate Self Service Portal- Web portal where election administrators of democratically run organizations create undebates for their candidates and voters
onDone is a function that is called when the user is logged in. Value is undefined or userInfo returned when the user logs in, valid should be true if login successful, false if not.
[x] Initially, the component will just render a button, that shows the name. This will replace SignInButton and SignUpButton
[x] If the user clicks on the button, then the modal will pop up and lead them through the steps.
[x] The modal will be centered vertically and horizontally. The width will be set in rem. This needs to work in landscape and portrait layouts, on any resolution device.
[x] If the user clicks outside of the login modal, the modal will disappear
[x] Update the UndebatesHeaderBar to use this component for both the Sign In Button and the Sign Up button.
[x] Remove the sign-in-button.js and sign-up-button.js files
[x] To implement the login functionality see useAuth in the civil-client.
Also see the use-auth.stories.js for how this can be built and tested in storybook. It may also be helpful to install the repo github.com/EnCiv/civil-server (in a separate directory) and run storybook there.
[x] The figma shows the Log In tab. If the user clicks on Sign Up, then the additional fields for confirm password and agree to the terms of service should be shown. And the button at the bottom should change to Sign Up
[x] For now, we don't have a Remember Me options - so don't implement that.
[x] If the name contains 'in' then start with the SignIn tab, otherwise the SignUp tab
[x] After getting it working in storybook, create a SignInSignUpPage component in app/web-components. See join.js in the civil-server repo as a starting point.
[x] Also create an entry in iotas.json with the path: "/qa/signinsignuppage", see the entry in with path: "home" as a starting point. After those are created, and after you have setup a MONGODB_URI, you will be able to npm run dev and then browse to localhost:3011/qa/signinsignuppage and test it with the server.
onDone is a function that is called when the user is logged in. Value is undefined or userInfo returned when the user logs in, valid should be true if login successful, false if not.
npm run dev
and then browse to localhost:3011/qa/signinsignuppage and test it with the server.