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

feat(signup): add multi-page signup to our flow #1824

Merged
merged 15 commits into from
May 6, 2022
Merged

Conversation

jefflembeck
Copy link
Contributor

@jefflembeck jefflembeck commented May 5, 2022

With an upcoming change in our authentication (using CP's oauth system instead of the saml system we use now), we're going to need to change how we handle signing up for an account.

This is a multi-step system that allows our users to sign up and be immediately logged in.

A huge thing here is that there is a new pattern for handling a routed to PHP file:

The Handler!

Handlers allow me to mock the instance of the RequestContext object, which means we can write unit tests for how we handle form submissions, munge data, where we make calls to, etc. We also have the beginnings of a Validator in here, something where we can check the bodies of POSTs.

I'm definitely up for a discussion on a lib I could use instead of building our own, but I basically am using one already.

Use these things. While PHP doesn't give me Array<Type>, it at least
lets me get some help from a text editor around some of this stuff.
Also, this way I can avoid doing the math in the handler for my display
text. I'd rather define a lot of this stuff (see: the annual savings
amount) on the backend, but we have what we have available
@jefflembeck jefflembeck merged commit c2bf5e7 into master May 6, 2022
@jefflembeck jefflembeck deleted the cp-signup branch May 6, 2022 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant