Documenting user.ts login - DataScience-GT/dsgt-member-portal GitHub Wiki

  • Has a RateLimit function which limits the number of requests the user can make - don't fully understand how this method works.
  • Is a post request (aka it sends information in the request). The information sent is the email and password of the user.
  • If either of the fields is missing then a missing required fields status error is thrown.
  • Converts emails address to lowercase and checks if the email has been used (aka if an account with that email exists) through the checkUserEmail() function.
  • Returns an appropriate status error if an account with that email does not exist or if the account is disabled. if the login is successful, some random session key is created through the createSession() function - not sure what the purpose of this is.
  • Invalid login credentials status error is thrown if login is not successful.