{"id":22674425,"url":"https://github.com/heathlogancampbell/restful-login","last_synced_at":"2026-05-20T07:04:46.604Z","repository":{"id":42308270,"uuid":"225268949","full_name":"HeathLoganCampbell/Restful-Login","owner":"HeathLoganCampbell","description":"🚪A simple restful login system, jwt, sequelize, express, passport","archived":false,"fork":false,"pushed_at":"2022-12-22T13:19:32.000Z","size":382,"stargazers_count":1,"open_issues_count":12,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T12:23:20.033Z","etag":null,"topics":["jwt","mysql","passport","rest","sequelize","website"],"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/HeathLoganCampbell.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":"2019-12-02T02:34:11.000Z","updated_at":"2024-03-21T23:01:31.000Z","dependencies_parsed_at":"2023-01-30T10:01:30.918Z","dependency_job_id":null,"html_url":"https://github.com/HeathLoganCampbell/Restful-Login","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HeathLoganCampbell/Restful-Login","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HeathLoganCampbell%2FRestful-Login","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HeathLoganCampbell%2FRestful-Login/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HeathLoganCampbell%2FRestful-Login/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HeathLoganCampbell%2FRestful-Login/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HeathLoganCampbell","download_url":"https://codeload.github.com/HeathLoganCampbell/Restful-Login/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HeathLoganCampbell%2FRestful-Login/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267097847,"owners_count":24035659,"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","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["jwt","mysql","passport","rest","sequelize","website"],"created_at":"2024-12-09T17:16:28.753Z","updated_at":"2026-05-20T07:04:41.556Z","avatar_url":"https://github.com/HeathLoganCampbell.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# REST Login system\nA REST login system.\nas time goes on, we are getting introducted to new technology everyday, so it's getting a bit out of hand, \nso we need modular code.\n\n## How it works\n1. a user registers with their email and password\n2. the password is encrypted and stored in a database\n3. you then signin with your username and password which will return you with a JWT \n4. you now make requests with your header being the JWT\n\n## Calls\n### Sign up\n```\nPOST \u003curl\u003e/api/user/signup\n\nBody (json)\n{\n\"email\": \"Akl@gmail.com\",\n\"password\": \"asdas\"\n}\n```\nCreate an account,\nif there is any problems such as missing field, email incorrect format, you'll recieve a meaningful error\n\n**Successful output**\n```json\n{\n    \"message\": \"successfully created new user\",\n    \"version\": \"yeet\"\n}\n```\n\n\u003cdetails\u003e\u003csummary\u003eClick for HTTP Request\u003c/summary\u003e\n\u003cp\u003e\n\n\n```http\nPOST /api/user/signup HTTP/1.1\nHost: localhost:3000\nContent-Type: application/json\ncache-control: no-cache\n\n{\n\"email\": \"Akl@gmail.com\",\n\"password\": \"asdas\"\n}\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n### Sign in\n```\nPOST \u003curl\u003e/api/user/signin\n\nBody (json)\n{\n\"email\": \"Akl@gmail.com\",\n\"password\": \"asdas\"\n}\n```\nGet your jwt token from the server\n\n**Successful output**\n```json\n{\n    \"success\": true,\n    \"token\": \"JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImFAZ21haWwuY29tIiwiaWF0IjoxNTc1Mzc4MzUyLCJleHAiOjE1NzUzOTYzNTJ9.OMi6iXhdqdFI0iFKJSyx0hLJPhnXTUVI6VW7l_C3n20\"\n}\n```\n\n\u003cdetails\u003e\u003csummary\u003eClick for HTTP Request\u003c/summary\u003e\n\u003cp\u003e\n\n\n```http\nPOST /api/user/signin HTTP/1.1\nHost: localhost:3000\nContent-Type: application/json\ncache-control: no-cache\n\n{\n\"email\": \"Akl@gmail.com\",\n\"password\": \"asdas\"\n}\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n### Can Access\n```\nGET \u003curl\u003e/api/user/can-access\n```\n\nwill return something if you're autherizied\n\n**Successful output**\n```json\n{\n    \"Animal\": \"Dogs\"\n}\n```\n\n\u003cdetails\u003e\u003csummary\u003eClick for HTTP Request\u003c/summary\u003e\n\u003cp\u003e\n\n\n```http\nGET /api/user/can-access HTTP/1.1\nHost: localhost:3000\nAuthorization: JWT \u003cYOUR TOKEN FROM /api/user/can-access here\u003e\ncache-control: no-cache\n\n\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\n## Tools\n- MySql (database)\n- jwt (Json web tokens)\n- sequelize (MySql ORM)\n- express (http management tool)\n- passport (Passport is authentication middleware)\n\n## What I would do differently next time\n* I would first formilize the return stucture of payloads, so it's less messy\n* I would use another more structured language like java or C# (Maybe even typescript)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheathlogancampbell%2Frestful-login","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheathlogancampbell%2Frestful-login","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheathlogancampbell%2Frestful-login/lists"}