RecursiveThinking / recursive_thinking_website

Recursive Thinking Website
5 stars 2 forks source link

Create Sign Up Flow #27

Closed amnevins closed 6 years ago

amnevins commented 6 years ago

Customer should be able to sign up and be routed to dashboard.

  1. Click on a the Sign Up button on the home screen for a sign up modal.
  2. Submitting the modal should call the signUp method in Auth.js
  3. A confirmation modal should pop up that takes a code.
  4. Submitting confirmation should call the confirmSignUp in Auth.js
  5. Route to Dashboard.
amnevins commented 6 years ago

2 things important to think about: Validation ~ via good html input types Cognito has a built in validator I already configured so at least inputs are length minimums of 1 for everything and maximums that vary and there all strings. Error Alerts - Customers should see a good error below the input or at the top of modal if they mess up the required field somehow.

sethborne commented 6 years ago

Austin/Experts - so I'm wondering - for the Error alerts/messages - should we have a global function that handles this for everything? (like errors on logins, but also errors on inputs/data unavailabe, etc?)

Maybe something like a function that takes the message type and an input string? (just a thought)

MynockSpit commented 6 years ago

Good idea. In your vision does this function do the validation or only display the error?

sethborne commented 6 years ago

Suppose it depends on size. If it gets big I'd split it up.

But mentally, I'd prefer to have (regardless of size) a validation function (or maybe a couple? again...depending) which does that logic, and just pushes out what needs to get displayed to the message function.

separate them into what they do essentially - that makes the most sense to me but def doesn't have to be

amnevins commented 6 years ago

Yeah I’d approach it pretty much exactly like that Seth.

amnevins commented 6 years ago

You can rely on html5 input type validation knowing that cognito will do hard validation on their side this can actually be pretty lightweght. Love the idea for the re usable alert, makes logging and analytics a dream later.

amnevins commented 6 years ago

Doing the alert component might be a smaller and seperate task?

amnevins commented 6 years ago

Working on confirmation, basic sign up is there

amnevins commented 6 years ago

Current Sign up flow complete as per https://github.com/RecursiveThinking/recursive_thinking_website/commit/30bbf94dc68b15764d1f6296c537c1e269ab8f20 We can rethink this when @MynockSpit as explored Slack integration more

amnevins commented 6 years ago

At least for now this affords us the flexibility to start signing in and returning/saving info on the user object