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

Add Auth to the app #16

Merged
merged 3 commits into from
Feb 4, 2024
Merged

Add Auth to the app #16

merged 3 commits into from
Feb 4, 2024

Conversation

redapy
Copy link
Collaborator

@redapy redapy commented Feb 4, 2024

For an example of how to fill this template out, see this Pull Request.

Description

  • Added sign-in and sign-out functionalities.
  • displayed the name of the current user, when they are signed-in

Related Issue

Closes #1

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.

Type of Changes

  • new feature

Updates

Before

Screenshot 2024-02-04 at 17 39 53

After

  • sign in state
    Screenshot 2024-02-04 at 17 40 40

  • sign out state
    Screenshot 2024-02-04 at 17 41 30

Testing Steps / QA Criteria

  • pull the branch mz-rb-auth and switch to it.
  • you can see the sign in button the home page.
  • click the signing button
  • your name and the sign out button will show up
  • you can enter the path of other pages in the URL, to check that the buttons are in all pages

Copy link

github-actions bot commented Feb 4, 2024

Visit the preview URL for this PR (updated for commit 8ec7157):

https://tcl-72-smart-shopping-list--pr16-mz-rb-auth-9utfffuo.web.app

(expires Sun, 11 Feb 2024 16:58:58 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: f7f2b0c98e4c5bce6be0f9b2cd44669f154caa67

@redapy redapy requested a review from llunaplanet February 4, 2024 16:46
</div>
) : (
<div>
<span>{user?.displayName}</span>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this addition a lot, it's useful

@llunaplanet llunaplanet merged commit 4692296 into main Feb 4, 2024
2 checks passed
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. As a user, I want to be able to sign in to the app.
3 participants