{"id":32438681,"url":"https://github.com/jonathanlb/sign-in","last_synced_at":"2025-10-26T00:50:30.459Z","repository":{"id":319356445,"uuid":"1078469619","full_name":"jonathanlb/sign-in","owner":"jonathanlb","description":"Protect WordPress content behind a shortcode tag and authenticate using AWS Cognito.","archived":false,"fork":false,"pushed_at":"2025-10-18T20:32:23.000Z","size":60,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-18T21:40:40.736Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/jonathanlb.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-17T19:34:11.000Z","updated_at":"2025-10-18T20:32:26.000Z","dependencies_parsed_at":"2025-10-18T22:12:06.090Z","dependency_job_id":"8737e08d-4779-4e47-a69d-7223f66ea5a7","html_url":"https://github.com/jonathanlb/sign-in","commit_stats":null,"previous_names":["jonathanlb/sign-in"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jonathanlb/sign-in","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanlb%2Fsign-in","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanlb%2Fsign-in/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanlb%2Fsign-in/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanlb%2Fsign-in/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonathanlb","download_url":"https://codeload.github.com/jonathanlb/sign-in/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanlb%2Fsign-in/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281043416,"owners_count":26434444,"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-10-25T02:00:06.499Z","response_time":81,"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":[],"created_at":"2025-10-26T00:50:28.948Z","updated_at":"2025-10-26T00:50:30.454Z","avatar_url":"https://github.com/jonathanlb.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sign-in: Cognito authentication for WordPress\n\nProtect WordPress content behind a shortcode tag and authenticate using AWS Cognito.\n\n## Setup\n- Create a AWS user pool and client id.\n  - Make sure that the client id has user-password authentication enabled.\n- Download the sign-in plugin to your plugins directory, e.g. `wp-content/plugins/sign-in`\n  - From the plugin directory, run `npm i`\n  - I'm sure I've forgotten all the steps to set up [wp-env](https://www.npmjs.com/package/@wordpress/env), but make sure Docker is running...\n- Navigate your browser to your site's WordPress dashboard and activate the sign-in plugin.\n- From the WordPress dashboard, select \"Settings -\u003e sign-in\"\n  - Enter the path, either relative to the `sign-in` plugin directory or absolute to your AWS credentials file.  If you don't specify a filename, sign-in will attempt to read a file called `credentials` in its plugin directory.\n  - Enter the security profile name.  If none is specified, sign-in will use `default`.\n  - Fill in the client and user-pool ids from the first step.\n- Create a page with content `[sign_in_require_auth]`\n  - All content following the brackets will filtered out and replaced with a login dialog unless the user successfully authenticates with an email and password stored by Cognito.\n  - You can override the settings set in the dashboard with tags inside the shortcode:\n    - `aws_credentials_path`\n    - `aws_client_id`\n    - `aws_profile`\n    - `aws_region`\n    - `aws_version`\n    - `cognito_user_pool_id`\n- You can add a logout button with the shortcode `[sign_in_logout]` to any page containing the `[sign_in_require_auth]` shortcode.\n  - Do not use the logout button on pages not requiring authentication.  The filter will not catch the shortcode and your viewers will see it.\n\n## Maintainence\n\n- **Linting:** `npm run lint`\n- **Code sniffing:** `npm run sniff`\n- **Unit testing:** \n  - `npm run wp-env-start`\n  - `npm t` # ad nausea...\n  - `npm run wp-env-stop`\n\n## TODOs\n\n- Provide [reset password functionality.](https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-cognito-idp-2016-04-18.html#forgotpassword)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanlb%2Fsign-in","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonathanlb%2Fsign-in","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanlb%2Fsign-in/lists"}