Skip to content

Latest commit

 

History

History
116 lines (97 loc) · 1.55 KB

README.md

File metadata and controls

116 lines (97 loc) · 1.55 KB

API DOCUMENTATION

Format

1. /api/auth/oauth/google

   - request
     ```json
     ```
   - response
     ```json
     ```
   - error
     ```json
     ```

Auth Routes

  1. /api/auth/signup

    • request
      {
        "email": "",
        "password": ""
      }
    • response
      {
        "success": true,
        "token": ""
      }
    • error
      {
        "err": [
          {
            "value": "gupthan849.com",
            "msg": "Invalid Email...",
            "param": "email",
            "location": "body"
          }
        ],
        "success": false
      }
  2. /api/auth/signin

    • request

      {
        "email": "",
        "password": ""
      }
    • response

      {
        "success": true,
        "token": ""
      }
    • error

      {
        "success": false,
        "err": "email and password does not match"
      }
      {
        "err": [
          {
            "value": "guptaishn849gmail.com",
            "msg": "Email field required...",
            "param": "email",
            "location": "body"
          }
        ],
        "success": false
      }
  3. /api/auth/oauth/google

    • response

      {
        "success": true,
        "token": ""
      }

      catch /api/auth/oauth/google/callback request

  4. /api/auth/oauth/facebook

    • response

      {
        "success": true,
        "token": ""
      }

      catch /api/auth/oauth/facebook/callback request