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

FEAT: Sign Up flow #3

Closed
12 tasks done
nikita-remeslov opened this issue Aug 16, 2024 · 11 comments · Fixed by #30
Closed
12 tasks done

FEAT: Sign Up flow #3

nikita-remeslov opened this issue Aug 16, 2024 · 11 comments · Fixed by #30
Assignees
Labels
BE Backend feature QA QA tasks

Comments

@nikita-remeslov
Copy link
Collaborator

nikita-remeslov commented Aug 16, 2024

What feature?

  • Add name column to users table through migration
  • Update model
  • Update service to save user
  • Use encryption service to hash user password before saving to the db
  • Add /auth/sign-up endpoint to the controller
  • Return object with user property in response (exclude password_hash and password_salt columns)
  • Add validation (check with the dev who is implementing FE task)

Acceptance criteria

Following this Test Cases: https://docs.google.com/spreadsheets/d/1b-xRyyn39r4N9k-P7zC618jotIVunZbbz1Vv9ipHNOM/edit?gid=1854802596#gid=1854802596

  • The migration runs successfully without errors in all environments.
  • Passwords are hashed using the encryption service before being stored in the database.
  • The user service ensures that the password_hash and password_salt columns are excluded from the returned user object.
  • A new /auth/sign-up endpoint is added to the controller.
  • After successful sign-up, the endpoint returns a user object with id, email, fullName, and token, excluding password_hash and password_salt.
@nikita-remeslov nikita-remeslov added the BE Backend feature label Aug 16, 2024
@nikita-remeslov nikita-remeslov added this to the Release 1.0 milestone Aug 16, 2024
@JPjok3r JPjok3r self-assigned this Aug 16, 2024
@JPjok3r JPjok3r linked a pull request Aug 20, 2024 that will close this issue
@nikita-remeslov nikita-remeslov moved this from Peer Review to In Progress in bsa-2024-outreachvids Aug 21, 2024
@nikita-remeslov nikita-remeslov added the MERGE CONFLICTS Merge conflicts while merging the PR label Aug 21, 2024
@JPjok3r JPjok3r removed the MERGE CONFLICTS Merge conflicts while merging the PR label Aug 24, 2024
@nikita-remeslov nikita-remeslov moved this from Peer Review to In Progress in bsa-2024-outreachvids Aug 27, 2024
@nikita-remeslov
Copy link
Collaborator Author

Check it please - #4 (comment)

@github-project-automation github-project-automation bot moved this from Peer Review to To Be Tested in bsa-2024-outreachvids Aug 28, 2024
@DaniellaZambrano DaniellaZambrano added the QA QA tasks label Aug 28, 2024
@DaniellaZambrano DaniellaZambrano self-assigned this Aug 28, 2024
@DaniellaZambrano DaniellaZambrano moved this from To Be Tested to In Testing in bsa-2024-outreachvids Aug 28, 2024
@DaniellaZambrano
Copy link
Collaborator

@JPjok3r How do you test the APIs on Swagger to make requests on the sign-up route?

@JPjok3r
Copy link
Contributor

JPjok3r commented Aug 29, 2024

Hi @DaniellaZambrano this is needed to test from swagger, { "fullName": "John Doe", "email": "[email protected]", "password": "string", "confirmPassword": "string" } this example data object structure should be sent to the endpoint for a successful store in database and receive status: 200, and for error the same as in FE.

@DaniellaZambrano
Copy link
Collaborator

@JPjok3r take a look

Image

@JPjok3r
Copy link
Contributor

JPjok3r commented Aug 29, 2024

@DaniellaZambrano well acording what we have, the url should be "http://localhost:3001/api/v1/auth/sign-up", and in the body is missing confirmPassword

@DaniellaZambrano
Copy link
Collaborator

@JPjok3r That’s how it is in Swagger; I’m not sure who added it that way, but those are the fields that are currently there. I can't add fields I’m not familiar with. If you check Swagger, you’ll see there isn’t more information available.

@JPjok3r
Copy link
Contributor

JPjok3r commented Aug 29, 2024

@DaniellaZambrano yes I was checking that, in sign-in is the same, who was in charge of that task, and here you can add fields, when you click on Try it out button and before clicking on execute

Image

But anyway I saw the url is wrong, that is why you are getting 404 "not found"

@DaniellaZambrano
Copy link
Collaborator

@JPjok3r can you give me the steps by steps to reproduce it?

@JPjok3r
Copy link
Contributor

JPjok3r commented Aug 29, 2024

Yes sure @DaniellaZambrano :

  1. Click on Try it out button

Image

  1. Click anywhere in the area where the data is printed

Image

  1. Then click execute.
    I saw Sanchousina is updating the documentation, but her Pull Request hasn't been merged yet, so maybe you will still getting 404.

@DaniellaZambrano
Copy link
Collaborator

@JPjok3r I'm not talking about that. I need is the URL you use and settings from localhost

@DaniellaZambrano
Copy link
Collaborator

Postman response:

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE Backend feature QA QA tasks
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants