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

1. As a user, I want to be able to sign in to the app. #14

Open
3 tasks
jeremiahfallin opened this issue Dec 25, 2023 · 0 comments
Open
3 tasks

1. As a user, I want to be able to sign in to the app. #14

jeremiahfallin opened this issue Dec 25, 2023 · 0 comments
Labels
enhancement New feature or request security

Comments

@jeremiahfallin
Copy link
Contributor

jeremiahfallin commented Dec 25, 2023

Summary

Being able to sign in is a foundational part of our app. Not only will it allow us to connect users to the shopping lists they have access to, it will prevent users from being cluttered with others' data and keep their own data from being messed with. This provides a layer of personalization and security to the app.

Auth is already set up in Firebase but there's no way for users to sign in on the actual site. We already have a useAuth hook, we just need to set it up so that we have a solid foundation for the rest of our issues.

Acceptance Criteria

  • The useAuth hook as well as the SignInButton and SignOutButton components are imported into Layout.jsx.
  • The SignInButton is displayed on every page if the user is not signed in.
  • The SignOutButton is displayed on every page if the user is signed in.

Notes

  • After adding this feature all collabies should sign in so that they're authenticated.
  • A test shopping list should be created and everyone should be invited to it for collaboration.
  • Until issue 3 is completed we can't create shopping lists with the app so we have to do this manually in firebase. This happens in 2 parts:
  1. The collection itself:
    a. Create a collection using an authenticated user's UID as the collection name.
    b. Add a document with a list name.
    c. Add a collection using the name items.
  2. Giving access to users:
    a. Inside the collection users there should be documents with every authenticated user's email.
    b. Inside each of these documents there is a field titled sharedLists.
    c. Inside this field add the shopping list that was just created with the format: /{user UID}/{shopping list name}
  • After these steps are followed everyone should have access to the list! We won't see this in action until after our first week's tasks!
@jeremiahfallin jeremiahfallin changed the title 0. As a user, I want to be able to sign in to the app. 1. As a user, I want to be able to sign in to the app. Dec 29, 2023
@segdeha segdeha added enhancement New feature or request security labels Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request security
Projects
None yet
Development

No branches or pull requests

2 participants