{"id":20535045,"url":"https://github.com/mmallikarjun2312/authentication_api","last_synced_at":"2026-04-11T19:07:06.430Z","repository":{"id":234166932,"uuid":"788372851","full_name":"MMALLIKARJUN2312/Authentication_API","owner":"MMALLIKARJUN2312","description":"User_login_signup_Authentication using NodeJS, Express JS, SQLite these api's perform various operations like verifying user credentials while login/signup after entering valid credentials it also encrypts password while signing up new user before storing in DB.","archived":false,"fork":false,"pushed_at":"2024-04-18T09:40:32.000Z","size":94,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-16T13:48:47.740Z","etag":null,"topics":["api","authentication","database","expressjs","javascript","loginsignup","nodejs","sqlite3"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MMALLIKARJUN2312.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-18T09:36:39.000Z","updated_at":"2024-04-18T09:45:58.000Z","dependencies_parsed_at":"2024-04-20T22:56:57.058Z","dependency_job_id":null,"html_url":"https://github.com/MMALLIKARJUN2312/Authentication_API","commit_stats":null,"previous_names":["mmallikarjun2312/authentication_api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MMALLIKARJUN2312%2FAuthentication_API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MMALLIKARJUN2312%2FAuthentication_API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MMALLIKARJUN2312%2FAuthentication_API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MMALLIKARJUN2312%2FAuthentication_API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MMALLIKARJUN2312","download_url":"https://codeload.github.com/MMALLIKARJUN2312/Authentication_API/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242138821,"owners_count":20078006,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","authentication","database","expressjs","javascript","loginsignup","nodejs","sqlite3"],"created_at":"2024-11-16T00:29:07.801Z","updated_at":"2025-12-30T21:36:03.291Z","avatar_url":"https://github.com/MMALLIKARJUN2312.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Authentication\n\nGiven an `app.js` file and a database file `userData.db` consisting of a  table `user`.\n\nWrite APIs to perform operations on the table `user` containing the following columns,\n\n**User Table**\n\n| Column   | Type    |\n| -------- | ------- |\n| username | TEXT |\n| name     | TEXT    |\n| password | TEXT    |\n| gender   | TEXT    |\n|location|TEXT|\n\n### API 1\n\n#### Path: `/register`\n\n#### Method: `POST`\n\n**Request**\n\n```\n{\n  \"username\": \"adam_richard\",\n  \"name\": \"Adam Richard\",\n  \"password\": \"richard_567\",\n  \"gender\": \"male\",\n  \"location\": \"Detroit\"\n}\n```\n\n- **Scenario 1**\n\n  - **Description**:\n\n    If the username already exists\n\n  - **Response**\n    - **Status code**\n      ```\n      400\n      ```\n    - **Status text**\n      ```\n      User already exists\n      ```\n\n- **Scenario 2**\n\n  - **Description**:\n\n    If the registrant provides a password with less than 5 characters\n\n  - **Response**\n    - **Status code**\n      ```\n      400\n      ```\n    - **Status text**\n      ```\n      Password is too short\n      ```\n\n- **Scenario 3**\n\n  - **Description**:\n\n    Successful registration of the registrant\n\n  - **Response**\n      - **Status code**\n        ```\n        200\n        ```\n      - **Status text**\n       ```\n       User created successfully\n       ```\n\n### API 2\n\n#### Path: `/login`\n\n#### Method: `POST`\n\n**Request**\n```\n{\n  \"username\": \"adam_richard\",\n  \"password\": \"richard_567\"\n}\n```\n\n- **Scenario 1**\n\n  - **Description**:\n\n    If an unregistered user tries to login\n\n  - **Response**\n    - **Status code**\n      ```\n      400\n      ```\n    - **Status text**\n      ```\n      Invalid user\n      ```\n\n- **Scenario 2**\n\n  - **Description**:\n\n    If the user provides incorrect password\n\n  - **Response**\n    - **Status code**\n      ```\n      400\n      ```\n    - **Status text**\n      ```\n      Invalid password\n      ```\n\n- **Scenario 3**\n\n  - **Description**:\n\n    Successful login of the user\n\n  - **Response**\n    - **Status code**\n      ```\n      200\n      ```\n    - **Status text**\n      ```\n      Login success!\n      ```\n\n### API 3\n\n#### Path: `/change-password`\n\n#### Method: `PUT`\n\n**Request**\n\n```\n{\n  \"username\": \"adam_richard\",\n  \"oldPassword\": \"richard_567\",\n  \"newPassword\": \"richard@123\"\n}\n```\n\n- **Scenario 1**\n\n  - **Description**:\n\n    If the user provides incorrect current password\n\n  - **Response**\n    - **Status code**\n      ```\n      400\n      ```\n    - **Status text**\n      ```\n      Invalid current password\n      ```\n\n- **Scenario 2**\n\n  - **Description**:\n\n    If the user provides new password with less than 5 characters\n\n  - **Response**\n    - **Status code**\n      ```\n      400\n      ```\n    - **Status text**\n      ```\n      Password is too short\n      ```\n\n- **Scenario 3**\n\n  - **Description**:\n\n    Successful password update\n\n  - **Response**\n    - **Status code**\n      ```\n      200\n      ```\n    - **Status text**\n      ```\n      Password updated\n      ```\n\n\n\u003cbr/\u003e\n\nUse `npm install` to install the packages.\n\n**Export the express instance using the default export syntax.**\n\n**Use Common JS module syntax.**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmallikarjun2312%2Fauthentication_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmmallikarjun2312%2Fauthentication_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmallikarjun2312%2Fauthentication_api/lists"}