Skip to content

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

@jeremiahfallin

Description

@jeremiahfallin

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions