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

Adds Join Page #16

Merged
merged 8 commits into from
Mar 18, 2022
Merged

Adds Join Page #16

merged 8 commits into from
Mar 18, 2022

Conversation

maxcell
Copy link
Contributor

@maxcell maxcell commented Mar 17, 2022

Summary

This will allow users to be able to sign up for the Stack! This functionality should allow us to already create a user profile without worry!

There are a few elements that need to be addressed before this work is fully ready for review though:

  • Add styling (We decided to move this to Add styling for Join and Login Page #20)
  • Investigate why session doesn't persist userID
  • Provide an example .env so folks can understand what the structure is

Manual Testing

  • Navigate to the Deploy Preview
  • Click on the Sign up Button
  • Input a valid email and password and click "Create Account"
  • User should be redirected back to the home page
  • User should see "View Notes for <user's email from creation step>"

Technical Details

  • A user navigates to the /join page. This will first run the loader function to determining if we have a user session already if not it will pass through with the rest of the rendering
  • A user will see what's in the Join function and allow them to fill in their credentials
  • Once a user clicks the submit button this will fire off the action function
  • The action function will create a user under the auth table and on the Supabase side, it will also implement a trigger that creates a profile row for us.
  • The profile is the user visible side of information and only exposes their email and an id
  • After created the user's id should be stored within the session cookie
  • We then redirect the user to the home page
  • In the Web console you should expect to see the Session cookie __session

Relevant Documentation

@netlify
Copy link

netlify bot commented Mar 17, 2022

✔️ Deploy Preview for ska-stack ready!

🔨 Explore the source changes: 13ff352

🔍 Inspect the deploy log: https://app.netlify.com/sites/ska-stack/deploys/62347dce1e054400080ed492

😎 Browse the preview: https://deploy-preview-16--ska-stack.netlify.app

@maxcell maxcell self-assigned this Mar 17, 2022
@maxcell maxcell marked this pull request as ready for review March 17, 2022 23:49
This commit has wip for session storage. We need to investigate why the session doesn't persist the information afterwards
By default using somethign like select will return an entire array for you. Instead you will want to make sure to always limit down to one record and that's what single() can do for you.
@maxcell
Copy link
Contributor Author

maxcell commented Mar 18, 2022

Got permission to merge without styling. Solve for #20

@maxcell maxcell merged commit ad1af53 into main Mar 18, 2022
@maxcell maxcell deleted the pw/11/joinPage branch March 18, 2022 14:20
@maxcell maxcell mentioned this pull request Mar 18, 2022
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.

Add join page
1 participant