{"id":24096162,"url":"https://github.com/becodeorg/oto","last_synced_at":"2025-06-23T15:32:53.165Z","repository":{"id":48006531,"uuid":"189907826","full_name":"becodeorg/oto","owner":"becodeorg","description":"⚙️ Oto, the man in the middle - OAuth2 middleware lambda","archived":false,"fork":false,"pushed_at":"2022-02-14T10:44:42.000Z","size":5229,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"develop","last_synced_at":"2025-03-24T21:04:13.430Z","etag":null,"topics":["internal-tool"],"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/becodeorg.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-06-03T00:06:01.000Z","updated_at":"2022-07-22T11:19:29.000Z","dependencies_parsed_at":"2022-08-12T16:21:21.976Z","dependency_job_id":null,"html_url":"https://github.com/becodeorg/oto","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/becodeorg/oto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/becodeorg%2Foto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/becodeorg%2Foto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/becodeorg%2Foto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/becodeorg%2Foto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/becodeorg","download_url":"https://codeload.github.com/becodeorg/oto/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/becodeorg%2Foto/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261504253,"owners_count":23168781,"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":["internal-tool"],"created_at":"2025-01-10T12:10:43.743Z","updated_at":"2025-06-23T15:32:53.142Z","avatar_url":"https://github.com/becodeorg.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BeCode: oto\n\n\u003e ⚙️ Oto, the man in the middle - OAuth2 middleware lambda\n\n* * *\n\n## About\n\n_By design_, you cannot use **OAuth2** without a server, since you need to store a _secret key_ from the provider.  \nIn a world full of PWA and static websites, it´s a _bummer_.\n\n**oto** is a small middleware, a lambda serverless function, which only role is to serve as the server in a OAuth2 transaction.\n\n[Read the **dev.to** article](https://dev.to/leny/introducing-oto-the-man-in-the-middle-52go) introducing oto \u0026 its purpose.\n\n## Installation\n\nFirstly, run the classic `npm install` to install dependencies.\n\nYou will also need to create the file `env/sls.env.json`, following this structure:\n\n```json\n{\n  \"dev\": {\n    \"PROVIDER_ACCESSID\": \"ACCESSKEY\",\n    \"PROVIDER_ACCESSID\": \"ACCESSKEY\"\n  }\n}\n```\n\nIt can contains as many values as you want (like for different stages of development).\n\nThe `PROVIDER` value is the service to connect, like `github` ; `ACCESSID` is the *public* access id given by the service ; `ACCESSKEY` is the *private* access key given by the service.\n\nExample:\n\n```json\n{\n  \"dev\": {\n    \"github_xxxxxx\": \"xyzxyzxyzxyz\"\n  }\n}\n```\n\n### Supported providers\n\n- [x] `github`\n- [x] `linkedin`\n- [ ] `google`\n\n## Usage\n\nRun `npm run build` to build the code, or `npm run work` to watch the changes and rebuild.\n\nRun `npm run dev` to create a local host serving the lambda, on port `6060`.\n\n### Deployment\n\nYou need to have [setup](https://serverless.com/framework/docs/providers/aws/guide/credentials/) the appropriate user from AWS and stored it in your `~/.aws/credentials`.\n\n#### Dev deployment\n\n\tnpm run deploy:dev --aws-profile=\u003cyour-aws-profile\u003e\n\n#### Production deployment\n\n\tnpm run deploy:prod --aws-profile=\u003cyour-aws-profile\u003e\n\t\n* * * \n\n\u003e 🤟 You are working on a project for BeCode and want to use **oto**?  \n\u003e Contact **My Becode Team** `my@becode.org` via email to inject your app's credentials and use our instances!\n\n* * *\n\nMy Becode Team\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbecodeorg%2Foto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbecodeorg%2Foto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbecodeorg%2Foto/lists"}