{"id":18477088,"url":"https://github.com/daisuke-awaji/decapcms-lambda-oauth2-backend","last_synced_at":"2025-11-17T15:01:49.583Z","repository":{"id":222231520,"uuid":"756639440","full_name":"daisuke-awaji/decapcms-lambda-oauth2-backend","owner":"daisuke-awaji","description":"OAuth client service as Github backend for DecapCMS.","archived":false,"fork":false,"pushed_at":"2024-09-28T10:53:24.000Z","size":79,"stargazers_count":8,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T06:21:50.272Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/daisuke-awaji.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":"2024-02-13T02:15:09.000Z","updated_at":"2025-02-07T22:57:54.000Z","dependencies_parsed_at":"2024-02-13T04:26:52.855Z","dependency_job_id":"309afb0e-f7b9-4a09-992c-bee4f779484a","html_url":"https://github.com/daisuke-awaji/decapcms-lambda-oauth2-backend","commit_stats":{"total_commits":2,"total_committers":2,"mean_commits":1.0,"dds":0.5,"last_synced_commit":"50794eed5169077691891325c9f2962e83699e20"},"previous_names":["daisuke-awaji/decapcms-lambda-oauth2-backend"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daisuke-awaji%2Fdecapcms-lambda-oauth2-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daisuke-awaji%2Fdecapcms-lambda-oauth2-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daisuke-awaji%2Fdecapcms-lambda-oauth2-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daisuke-awaji%2Fdecapcms-lambda-oauth2-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daisuke-awaji","download_url":"https://codeload.github.com/daisuke-awaji/decapcms-lambda-oauth2-backend/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249419621,"owners_count":21268671,"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":[],"created_at":"2024-11-06T11:04:01.295Z","updated_at":"2025-11-17T15:01:44.543Z","avatar_url":"https://github.com/daisuke-awaji.png","language":"TypeScript","funding_links":[],"categories":["OAuth Client"],"sub_categories":[],"readme":"# DecapCMS Lambda Oauth2 Backend\n\nDecapCMS is an open source project that you can use without using Netlify. In order to do so, you need a way to authenticate; one of the ways to do this is using GitHub oAuth. If you're going to do that though, you need a server-side component acting as the oAuth client, allowing your admin users to connect to GitHub's servers to authenticate.\n\nThis application \"DecapCMS Lambda Oauth2 Backend\" acts as a lightweight OAuth Provider wrapper that works on AWS Lambda and Amazon API Gateway instead of the Netlify Auth API.\n\n# Feature\n\n- [x] GitHub OAuth Provider\n- [] GitLab OAuth Provider\n\n# Deploy\n\n## 1. OAuth Provider setup\n\nYou need to create an API application and make note of the Client ID and a Client Secret so that you can use them in your configuration.\n\n1. In GitHub, go to your account Settings and select Developer Settings, then OAuth Apps or use [this shortcut](https://github.com/settings/developers).\n\n2. Select Register a new application.\n\n3. For the Authorization callback URL, enter https://xxxx.execute-api.ap-northeast-1.amazonaws.com/prod/callback. \\*Set this value again after you deploy API Gateway.\n\n## 2. Deploy API Gateway and AWS Lambda\n\nTo save GitHub's OAuth Client ID and Secret in Lambda's environment variables, save the values in Parameter Store in advance.\n\n```bash\n$ aws ssm put-parameter \\\n    --type 'String' \\\n    --name '/CDK/DecapCMSOAuthBackend/OAUTH_GITHUB_CLIENT_ID' \\\n    --value 'df2655731exxxxxxxx'\n\n$ aws ssm put-parameter \\\n    --type 'String' \\\n    --name '/CDK/DecapCMSOAuthBackend/OAUTH_GITHUB_CLIENT_SECRET' \\\n    --value '26badbd6ecxxxxxxxxxxxxxxxxxxxxxx'\n```\n\nthen\n\n```\n$ cdk deploy\n```\n\nMake a note of the API Gateway endpoint that is output to the console. Set this endpoint in the Authorization callback URL on the [GitHub Developer Settings page](https://github.com/settings/developers).\n\n## 3. CMS Config\n\nYou also need to add `base_url` to the backend section of your DecapCMS's config file. `base_url` is the live URL of this repo with no trailing slashes.\n\n```yaml\nbackend:\n  name: github\n  repo: user/repo # Path to your GitHub repository\n  branch: main\n  base_url: https://xxxx.execute-api.ap-northeast-1.amazonaws.com # your apigateway endpoint\n  auth_endpoint: /prod/auth\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaisuke-awaji%2Fdecapcms-lambda-oauth2-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaisuke-awaji%2Fdecapcms-lambda-oauth2-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaisuke-awaji%2Fdecapcms-lambda-oauth2-backend/lists"}