{"id":19663505,"url":"https://github.com/mr-dhruv/authify-the-authentication-api","last_synced_at":"2025-07-04T23:07:38.864Z","repository":{"id":122846182,"uuid":"541608188","full_name":"MR-DHRUV/Authify-The-Authentication-API","owner":"MR-DHRUV","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-16T14:58:34.000Z","size":82,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-04T23:07:38.286Z","etag":null,"topics":["api","api-rest","authentication","expressjs","google-authentication","javascript","jwt","nodejs","oath2"],"latest_commit_sha":null,"homepage":"https://api-authify.azurewebsites.net/","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/MR-DHRUV.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":"2022-09-26T13:43:35.000Z","updated_at":"2023-11-12T19:27:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"f2763fbc-a7f0-4b95-b8bd-9a13be6c0b05","html_url":"https://github.com/MR-DHRUV/Authify-The-Authentication-API","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MR-DHRUV/Authify-The-Authentication-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MR-DHRUV%2FAuthify-The-Authentication-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MR-DHRUV%2FAuthify-The-Authentication-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MR-DHRUV%2FAuthify-The-Authentication-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MR-DHRUV%2FAuthify-The-Authentication-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MR-DHRUV","download_url":"https://codeload.github.com/MR-DHRUV/Authify-The-Authentication-API/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MR-DHRUV%2FAuthify-The-Authentication-API/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263632057,"owners_count":23491530,"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","api-rest","authentication","expressjs","google-authentication","javascript","jwt","nodejs","oath2"],"created_at":"2024-11-11T16:14:57.473Z","updated_at":"2025-07-04T23:07:38.848Z","avatar_url":"https://github.com/MR-DHRUV.png","language":"JavaScript","readme":"\n\n# Authify : The Authentication API\nSecure, complete and hassle free **authentication solution** for your applications\n\n## Features\n\n- Signup using Email and generation of unique JWT token.\n- Signin\n- Fetching User details from JWT token.\n- Reseting Password via OTP on corresponding Email address.\n- Authentication using Google.\n- Deletion of account\n- **Instant Updates on email for all account activity like login ,  change of password, and etc**\n\n## Endpoints\n\n### Signup\n\n#### I Sending OTP to given email address:\n\n```js\n  POST https://api-authify.azurewebsites.net/auth/signup/email\n```\n\n#### Body :\n\n| Parameter  | Type     | Description                             |\n| :--------- | :------- | :-------------------------------------- |\n| `email`    | `string` | **Required** Email Address                 |\n\n#### Usage\n\njavascript:\n\n```javascript\nconst createNewUserViaEmail = await fetch('https://api-authify.herokuapp.auth/signup/email', {\n    method: 'POST',\n    headers: {\n        'Content-Type': 'application/json'\n    },\n    body: JSON.stringify({ email: credentials.email})\n});\nconst json = await createNewUserViaEmail.json();\nconsole.log(json);\n```\n\n#### response\n\n```javascript\n{\n  \"success\": true,\n}\n\n```\n\n#### II Verivication and creation of a new user:\n\n```js\n  POST https://api-authify.azurewebsites.net/auth/signup/email/verify\n```\n\n#### Body :\n\n| Parameter  | Type     | Description                             |\n| :--------- | :------- | :-------------------------------------- |\n| `name`     | `string` | **Required** Name (min length : 3)     |\n| `email`    | `string` | **Required** Email add                 |\n| `password` | `string` | **Required** password (min length : 8) |\n| `authcode` | `number` | **Required** password (length : 6) |\n\n#### Usage\n\njavascript:\n\n```javascript\nconst createNewUser = await fetch(\n  \"https://api-authify.azurewebsites.net/auth/signup\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\n      name: credentials.name,\n      email: credentials.email,\n      password: credentials.password,\n      authcode: credentials.authCode\n    }),\n  }\n);\nconst response = await createNewUser.json();\nconsole.log(json);\n```\n\n#### response\n\n```javascript\n{\n  \"success\": true,\n  \"authToken\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7InVzZXIiOiI2MjljN2YzYWVmMzEwNjg4N2EyYWNkZDAifSwiaWF0IjoxNjU0NDIzMzU1fQ.R1rX4sRHv-o3gDWT3XqtobYEKeYRmyvA8ZLpveobuGc\"\n}\n\n```\n\n### Signin\n\n```js\n  POST https://api-authify.azurewebsites.net/auth/signin\n```\n\n#### Body :\n\n| Parameter  | Type     | Description                             |\n| :--------- | :------- | :-------------------------------------- |\n| `email`    | `string` | **Required** Email address             |\n| `password` | `string` | **Required** password (min length : 8) |\n\n#### Usage\n\njavascript:\n\n```javascript\nconst signInUser = await fetch(\n  \"https://api-authify.azurewebsites.net/auth/signin\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\n      email: credentials.email,\n      password: credentials.password,\n    }),\n  }\n);\nconst response = await signInUser.json();\nconsole.log(json);\n```\n\n#### response\n\n```javascript\n{\n  \"success\": true,\n  \"authToken\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7InVzZXIiOiI2MjljN2YzYWVmMzEwNjg4N2EyYWNkZDAifSwiaWF0IjoxNjU0NDIzMzU1fQ.R1rX4sRHv-o3gDWT3XqtobYEKeYRmyvA8ZLpveobuGc\"\n}\n\n```\n\n### Fetch User details from token \\ Verification\n\n```js\n  POST https://api-authify.azurewebsites.net/auth/verifyuser\n```\n\n#### Header :\n\n| Parameter      | Type     | Description                                                                                                                                                                       |\n| :------------- | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `Content-Type` | `string` | **Required** application/json                                                                                                                                                    |\n| `auth-token`   | `string` | **Required** eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1..... |\n\n#### Usage\n\njavascript:\n\n```javascript\nconst getUser = await fetch(\n  \"https://api-authify.azurewebsites.net/auth/verifyuser\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Content-Type\": \"application/json\",\n      \"auth-token\":\n        \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7InVzZXIiOiI2MjljN2YzYWVmMzEwNjg4N2EyYWNkZDAifSwiaWF0IjoxNjU0NDIzMzU1fQ.R1rX4sRHv-o3gDWT3XqtobYEKeYRmyvA8ZLpveobuGc\",\n    },\n  }\n);\nconst response = await getUser.json();\nconsole.log(json);\n```\n\n#### response\n\n```javascript\n{\n  \"_id\": \"629c7f3aef3106887a2acdd0\",\n  \"name\": \"user\",\n  \"email\": \"userEmail@fudnef.com\",\n  \"googleId\": null,\n  \"date\": \"2022-06-05T10:02:34.938Z\",\n  \"__v\": 0\n}\n\n```\n\n### Reseting password\nCan be used for both resetting the password and updation of password\n\n#### I : Sending OTP to corresponding Email address\n\n```js\n  POST https://api-authify.azurewebsites.net/fogotpassword\n```\n\n#### Body :\n\n| Parameter | Type     | Description                 |\n| :-------- | :------- | :-------------------------- |\n| `email`   | `string` | **Required**. Email address |\n\n#### Usage\n\njavascript:\n\n```javascript\nconst sendMail = await fetch(\n  \"https://api-authify.azurewebsites.net/fogotpassword\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({ email: credentials.email }),\n  }\n);\n\nconst response = await sendMail.json();\nconsole.log(response);\n```\n\n#### response\n\n```javascript\n{\n  \"success\": true,\n  \"message\": \"Email Send\"\n}\n\n```\n\n### II : OTP verification and updating new password\n\n```js\n  POST https://api-authify.azurewebsites.net/fogotpassword/verify\n```\n\n#### Body :\n\n| Parameter  | Type     | Description                                 |\n| :--------- | :------- | :------------------------------------------ |\n| `email`    | `string` | **Required**. Email address                 |\n| `authcode` | `number` | **Required**. OTP (6 digit)                 |\n| `password` | `string` | **Required**. new password (min length : 8) |\n\n#### Usage\n\njavascript:\n\n```javascript\nconst changePassword = await fetch(\n  \"https://api-authify.azurewebsites.net/fogotpassword/verify\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\n      email: credentials.email,\n      authcode: Number(credentials.OTP),\n      password: credentials.password,\n    }),\n  }\n);\n\nconst response = await changePassword.json();\n```\n\n#### response\n\n```javascript\n{\n    \"success\" : true ,\n    \"msg\" : \"Password Updated\"\n}\n\n```\n\n### Authentication with Google\n\nTo authenticate with google, you need to pass your app url as a query parameter in the url. Once the user authenticates with google, the user will be redirected to the app url with the auth token as a query parameter. You can fetch the token from the url and use it for further authentication.\n\n```http\n  PUT https://api-authify.azurewebsites.net/auth/google?url={YOUR_APP_URL}\n```\n\n#### Usage\n\nhtml:\n```html\n\u003c!-- Redirection to Oauth screen and trigger initialization --\u003e\n\u003ca href='https://api-authify.azurewebsites.net/auth/google?url={YOUR_APP_URL}' target='_blank'\u003eContinue with Google \u003c/a\u003e\n```\n\n#### Response URL\n\n```javascript\nhttps://www.mrdhruv.co/?authToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7InVzZXIiOiI2NjFlODljYmJlNjgzMzc1N2FiNTUxY2YifSwiaWF0IjoxNzEzMjc3NDUyfQ.n8_WjYngosSCByfeQgtyx51hVle6p1eRY6QcdZojOSs\n```\n\n\n### Delete Account\n\n#### I Sending Otp to given email address:\n\n```js\n  POST https://api-authify.azurewebsites.net/auth/delete/email\n```\n\n#### Body :\n\n| Parameter  | Type     | Description                             |\n| :--------- | :------- | :-------------------------------------- |\n| `email`    | `string` | **Required** Email address             |\n\n#### Usage\n\njavascript:\n\n```javascript\nconst deleteGen = await fetch('https://api-authify.azurewebsites.net/autdelete/email', {\n        method: 'POST',\n        headers: {\n            'Content-Type': 'application/json'\n        },\n        body: JSON.stringify({ email: user.email })\n    })\n\n    const response = await deleteGen.json();\n    console.log(response)\n```\n\n#### response\n\n```javascript\n{\n  \"success\": true,\n}\n\n```\n\n\n#### II OTP verification and account deletion:\n\n```js\n  POST https://api-authify.azurewebsites.net/auth/delete/email\n```\n\n#### Body :\n\n| Parameter  | Type     | Description                             |\n| :--------- | :------- | :-------------------------------------- |\n| `email`    | `string` | **Required** Email address             |\n| `authcode`    | `number` | **Required** OTP (6 digit)           |\n| `password`    | `string` | **Required** Password (min-length : 8)            |\n\n#### Usage\n\njavascript:\n\n```javascript\nconst response = await fetch('https://api-authify.azurewebsites.net/auth/delete/email/verify', {\n        method: 'POST',\n        headers: {\n            'Content-Type': 'application/json'\n        },\n        body: JSON.stringify({ email: user.email, authcode: Number(credentials.   verifyToken), password: credentials.password })\n  })\n\nconst response = await deleteGen.json();\nconsole.log(response)\n```\n\n#### response\n\n```javascript\n{\n  \"success\": true,\n}\n\n```\n\n## Support\n\nFor any issue or query I'll love to hear at : developer.authify@gmail.com\n\n**We love contributions ❤️** \u003cbr\u003eContribute to this api \u003ca href=\"https://github.com/MR-DHRUV/Authify-The-Authentication-API\" target=\"_blank\" rel=\"noopener noreferrer\"\u003ehere\u003c/a\u003e\n\n\n## Contact Me \u003cbr\u003e\n\n\n\u003ca href=\"https://www.linkedin.com/in/dhruv-gupta-55034a228/\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n  \u003cimg src=\"https://cdn-icons-png.flaticon.com/512/1384/1384014.png\" alt=\"\" width=\"50px\" height=\"50px\"\u003e\n\u003c/a\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n\u003ca href=\"https://github.com/MR-DHRUV\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n  \u003cimg src=\"https://cdn-icons-png.flaticon.com/512/733/733609.png\" alt=\"\" width=\"50px\" height=\"50px\"\u003e\n\u003c/a\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n\u003ca href=\"mailto://developer.authify@gmail.com\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n  \u003cimg src=\"https://cdn-icons-png.flaticon.com/512/60/60543.png\" alt=\"\" width=\"50px\" height=\"50px\"\u003e\n\u003c/a\u003e\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmr-dhruv%2Fauthify-the-authentication-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmr-dhruv%2Fauthify-the-authentication-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmr-dhruv%2Fauthify-the-authentication-api/lists"}