Userstories (not really) - SuQuoc/ft_transcendence GitHub Wiki

signup: As a new user, i want to make an account.

  • on signup page:

    • user enters email and password and presses "sign up"
      • frontend sends POST request to registration/signup endpoint with email and pw
      • registration creates the user with status "not verified"
      • registration sends user to email to verify it
      • refistration sends response 201 to frontend if there is no problem with the email
      • frontend asks user to verify email adress if everything is correctly entered(email is not verified yet)
      • (does frontend need to send request to registration so it can send a response?)
    • user opens email and clicks on link to verify it
      • link makes request to the verification endpoint (registration/verify-email)
      • registration sends response (to be defined) whether the email could be correctly verified or not
      • fronend goes to next step (enter displayname)
    • user goes back to page and enters displayname
      • frontend sends POST request to UM server with the displayname
      • UM server sends response whether the displayname is ok or not
    • user successfully signed in
  • on login page:

    • user enters email and password and presses "login"
      • frontend sends registration server the data
      • registration sends response 200 if everything is ok
      • frontend sends UM request to get the displayname
      • UM server sends frontend the displayname as response (or if it doesn't exist)
        • if user has no displayname yet, frontend asks user to make one and finish signup