{"id":24792651,"url":"https://github.com/titomiguelcosta/lock","last_synced_at":"2026-04-12T22:05:50.590Z","repository":{"id":145809340,"uuid":"167780212","full_name":"titomiguelcosta/lock","owner":"titomiguelcosta","description":"Playground for OAuth2 with Flask","archived":false,"fork":false,"pushed_at":"2019-01-27T07:05:32.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T20:44:15.160Z","etag":null,"topics":["flask","oauth2","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/titomiguelcosta.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":"2019-01-27T06:55:22.000Z","updated_at":"2019-01-27T07:05:33.000Z","dependencies_parsed_at":"2023-06-11T06:30:12.783Z","dependency_job_id":null,"html_url":"https://github.com/titomiguelcosta/lock","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/titomiguelcosta%2Flock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titomiguelcosta%2Flock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titomiguelcosta%2Flock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titomiguelcosta%2Flock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/titomiguelcosta","download_url":"https://codeload.github.com/titomiguelcosta/lock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245296727,"owners_count":20592263,"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":["flask","oauth2","python"],"created_at":"2025-01-29T20:39:25.198Z","updated_at":"2025-10-30T08:15:43.998Z","avatar_url":"https://github.com/titomiguelcosta.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docs\n\nRead the [official documentation](https://flask-oauthlib.readthedocs.io/en/latest/oauth2.html#example-for-oauth-2)\n\n1. Install dependencies $ pip install -r requirements.txt\n1. Start the server by executing $ python server.py\n1. Database will be created and populates with dummy data\n\n## Authorize\n\nFirst authorize by passing the client_id, client_secret, username and password and grab the CODE from the response\n\n```curl -vvv -X GET \"http://localhost:8080/oauth/authorize?response_type=code\u0026client_id=confidential\u0026redirect_uri=http%3A%2F%2Flocalhost%3A8000%2Fauthorized\u0026scope=email+address\u0026username=admin\u0026password=112\"```\n\n## Token\n\nGet the access token using the code from the previous call\n\n```curl -X POST --data \"code=\u003cCODE\u003e\u0026grant_type=authorization_code\u0026client_id=confidential\u0026redirect_uri=http://localhost:8000/authorized\u0026client_secret=confidential\" \"http://localhost:8080/oauth/token?response_type=code\"```\n\n## Test\n\nTest calling the email endpoint\n\n```curl -vvv -H \"Authorization: Bearer \u003cACCESS_TOKEN\u003e\" http://localhost:8080/api/email```\n\n## ToDo\n\n1. Encrypt password\n1. Add permissions and roles per user","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftitomiguelcosta%2Flock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftitomiguelcosta%2Flock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftitomiguelcosta%2Flock/lists"}