{"id":13527332,"url":"https://github.com/negativo/JWT-Auth-NodeJS-Starter-Kit","last_synced_at":"2025-04-01T09:31:24.291Z","repository":{"id":46212795,"uuid":"64118917","full_name":"negativo/JWT-Auth-NodeJS-Starter-Kit","owner":"negativo","description":"a Simple implementation of JWT Token auth with NodeJS and Express","archived":false,"fork":false,"pushed_at":"2023-01-23T17:38:36.000Z","size":373,"stargazers_count":8,"open_issues_count":10,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-02T12:34:35.440Z","etag":null,"topics":["auth","javascript","jwt","mongodb","nodejs"],"latest_commit_sha":null,"homepage":null,"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/negativo.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}},"created_at":"2016-07-25T08:51:55.000Z","updated_at":"2023-04-11T15:19:04.000Z","dependencies_parsed_at":"2023-01-30T05:31:27.260Z","dependency_job_id":null,"html_url":"https://github.com/negativo/JWT-Auth-NodeJS-Starter-Kit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/negativo%2FJWT-Auth-NodeJS-Starter-Kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/negativo%2FJWT-Auth-NodeJS-Starter-Kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/negativo%2FJWT-Auth-NodeJS-Starter-Kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/negativo%2FJWT-Auth-NodeJS-Starter-Kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/negativo","download_url":"https://codeload.github.com/negativo/JWT-Auth-NodeJS-Starter-Kit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246616084,"owners_count":20806052,"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":["auth","javascript","jwt","mongodb","nodejs"],"created_at":"2024-08-01T06:01:45.896Z","updated_at":"2025-04-01T09:31:23.924Z","avatar_url":"https://github.com/negativo.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Simple Node JWT-Token Authentication starter kit.\n\n![alt tag](http://i.imgur.com/vlLzUe4.gif)\n\n\nThis repo uses JSON Web Tokens and the [jsonwebtoken](https://github.com/auth0/node-jsonwebtoken) package to implement token based authentication on a simple Node.js API with a MongoDB Database.\n\nThis is a starting point to have an API up and running in notime.\n\nThe Api Features:\n\n\t- JWT Auth Token\n\t- User Management\n\n##Installation\n\n###With Docker\n\n- edit `.env.example` and save it as `.env`\n- docker-compose up\n\n###Without Docker\n\nThis project needs NodeJS \u003e v5.0.0, MongoDB and `forever` to manage the process.\n\n- clone the project `git clone git@github.com:negativo/JWT-Auth-NodeJS-Starter-Kit`\n- run `npm install`\n- run `mongod`\n- edit `.env.example` and save it as `.env`\n- `npm start`\n- `npm test`\n\n##API\n\n###Setup test user\n\nTo setup an admin user edit your `.env` file and request the url  `http://localhost:8282/setup`\n\n`curl http://localhost:8282/setup`\n\n###Versioning\n\n###Authenticate\n\nTo authenticate a user do a POST request to http://localhost:8282/auth\nwith the `name` and the `password` in the body\n\n\t{\n\t\tname:\"jwtauth\",\n\t\tpassword:\"jwtauth\"\n\n\t}\n\n\n`curl -H \"Content-Type: application/json\" -X GET http://localhost:8080/setup`\n`curl -H \"Content-Type: application/json\" -X POST -d '{ \"name\":\"user\",\"password\":\"password\"}' http://localhost:8080/api/auth`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnegativo%2FJWT-Auth-NodeJS-Starter-Kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnegativo%2FJWT-Auth-NodeJS-Starter-Kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnegativo%2FJWT-Auth-NodeJS-Starter-Kit/lists"}