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

User Registration #85

Open
drewroberts opened this issue Mar 25, 2021 · 1 comment
Open

User Registration #85

drewroberts opened this issue Mar 25, 2021 · 1 comment
Assignees

Comments

@drewroberts
Copy link
Member

With the addition of Email Address (TIPOFF/authorization#57) and the conversion of the User model (TIPOFF/authorization#20) to rely on it, I want to change the way we are handling User Creation during the Checkout Flow. Instead of creating a new User when the Cart (#34) is created, I want to wait and create the new User when the Order (#32) is created.

Therefore, a Cart will belong to an Email Address. I no longer need the first name & last name when creating a Cart, just an Email Address for it. When an item is added to the Cart, the website visitor will be redirected to a screen that simply says:

Please enter your email address to save your cart items:

We will then need to add the first name and last name fields to the Checkout page to process an Order.

Cart will still have a relationship with User, just through the Email Address model. It will only be for the percentage of Carts that have processed an Order. This will reduce the number of Users that are created in the application.

@pdbreen
Copy link
Contributor

pdbreen commented Mar 25, 2021

This will likely work best with a new type of session based auth guard (call it 'email') where submission of an email address will automatically create an authenticated session with that guard. Then, FE/BE can still leverage authenticated sessions to determine who's making the request and which cart belongs to them. Will add a bit of logic to test which guard allowed the request on the handful of routes that need to support email only sessions (still want to allow for logged in users on those routes).

drewroberts added a commit that referenced this issue Mar 27, 2021
Change cart ownership from User to EmailAddress #85
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

No branches or pull requests

2 participants