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

Sign In | BE functionality #133

Open
10 tasks
v0ldemar01 opened this issue Jun 11, 2024 · 0 comments
Open
10 tasks

Sign In | BE functionality #133

v0ldemar01 opened this issue Jun 11, 2024 · 0 comments

Comments

@v0ldemar01
Copy link
Collaborator

v0ldemar01 commented Jun 11, 2024

User story:
As a registered user, I want to be able to sign in to my account using my credentials, So that I can access personalized features and data within the application.

Acceptance criteria:

  • Model getting user for sign-in checkin

  • Service sign-in user flow

  • Controller sign-in route

  • Validation shared with FE

  • When a request for sign-in is received, the service should perform validation based on registration one

  • When a request for sign-in is received the system should retrieve the user’s data from the database based on the provided email. If the email exists in the database, then the data (without password) is returned to the frontend.

  • The user’s password is verified against the provided password, the service should perform password validation, compare hashes, and determine if the credentials are correct.

  • The controller should delegate the sign-in request to the authentication service and return responses based on the success or failure of the authentication process.

  • If user credentials are valid and password verification is successful then users should be issued an authentication token to represent their session(currently it should be hardcoded like token from ${JSON.stringify(data)}). The token should include the user’s id.

  • The error status code (422) and “Login failed. Invalid Email or Password” error message indicating the authentication failure is displayed, when password verification is failed. The 404 error status code and "User not found" error message indicating the authentication failure is displayed when user credentials is invalid.

@v0ldemar01 v0ldemar01 changed the title Sign In functionality Sign In | BE functionality Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant