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

Login Page UI and Functionality #28

Open
alejandroo-pc opened this issue Apr 10, 2024 · 0 comments
Open

Login Page UI and Functionality #28

alejandroo-pc opened this issue Apr 10, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@alejandroo-pc
Copy link
Collaborator

alejandroo-pc commented Apr 10, 2024

As a user, I want to be able to log into the application and be redirected to a home page. I also wanted to be prompted with errors if credentials are invalid.

Since the login and sign up pages use the same styling (different input fields) you can refer to styling on the sign up page for consistency.

Acceptance Criteria

UI/Basic functionality

  • Login button on landing page should link to login page
  • Login page styling should follow the Figma designs here
    • Fields for username and password
  • when a user enters a password, the characters should be hidden for security
  • User should be redirected to sign up page if they do not have an account

Login functionality

! 2 test users has been created in the app + their username/password can be found in the team's Slack canvas

You will implement the logic to login a user.

  • a POST request to http://localhost:8000/api/v1/users/login
    • use fetch() to make the request
    • the fetch body should include the username and password.
  • when the password or username is incorrect a user should expect an error message
    • prompt "invalid username or password"
    • use react-toastify
  • on a successful entry of username and password
    • a user should automatically be redirected to the homepage
    • save the user's account details using useState at the top of the component tree (all further fetch requests require a bearer token in an Authorization header.
@alejandroo-pc alejandroo-pc added the enhancement New feature or request label Apr 10, 2024
@raybgomez raybgomez self-assigned this Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants