{"id":45334698,"url":"https://github.com/helmutkaufmann/wn-totp2fa-plugin","last_synced_at":"2026-02-21T09:01:19.861Z","repository":{"id":338367479,"uuid":"1157469018","full_name":"helmutkaufmann/wn-totp2fa-plugin","owner":"helmutkaufmann","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-14T09:00:52.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-14T11:41:24.208Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/helmutkaufmann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2026-02-13T21:20:09.000Z","updated_at":"2026-02-14T09:00:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/helmutkaufmann/wn-totp2fa-plugin","commit_stats":null,"previous_names":["helmutkaufmann/wn-totp2fa-plugin"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/helmutkaufmann/wn-totp2fa-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helmutkaufmann%2Fwn-totp2fa-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helmutkaufmann%2Fwn-totp2fa-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helmutkaufmann%2Fwn-totp2fa-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helmutkaufmann%2Fwn-totp2fa-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/helmutkaufmann","download_url":"https://codeload.github.com/helmutkaufmann/wn-totp2fa-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helmutkaufmann%2Fwn-totp2fa-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29677881,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T06:23:40.028Z","status":"ssl_error","status_checked_at":"2026-02-21T06:23:39.222Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-02-21T09:00:58.780Z","updated_at":"2026-02-21T09:01:19.849Z","avatar_url":"https://github.com/helmutkaufmann.png","language":"PHP","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# Mercator.TOTP2FA\nTime-based one time password two-factor authentication (TOTP 2FA) for Winter CMS backend users.\n\n## Description\n- Backend decides which users **must** enroll (Off / All / Roles).\n- If a user must use 2FA but has none, user is forced into **enrollment**. Recovery codes are shown once, immediately after enrollment.\n- Users can regenerate recovery codes themselves in the backend. New codes are shown once immediately after regeneration\n\n## Requirements\n- Winter CMS 1.3 (Laravel 12)\n- PHP \u003e= 8.2\n- Composer:\n  - pragmarx/google2fa\n  - bacon/bacon-qr-code\n  - winter/wn-user-plugin\n\n## Installation\nRun composer installation\n```bash\ncomposer require pragmarx/google2fa bacon/bacon-qr-code\n```\n\nRun plugin migrations\n```bash\nphp artisan winter:up\n```\n\nConfigure enforcement in the backend → Settings → Security → Backend TOTP 2FA\n- Off\n- All users\n- Selected roles (choose from a checkbox list of all backend roles)\n\n## Additional information\n### User flow\n- If required and not enrolled → `/mercator/totp2fa/challenge/setup`\n- If enrolled but not verified this session → `/mercator/totp2fa/challenge`\n- After successful enrollment or regeneration → `/mercator/totp2fa/challenge/recovery` (codes shown once)\n- Users can regenerate codes at `/mercator/totp2fa/challenge/manage`\n\n### Security notes\n- `backend.page.beforeDisplay` and `backend.ajax.beforeRunHandler` are both enforced (prevents AJAX bypass).\n- Secrets + recovery codes are encrypted using Laravel `Crypt`.\n- Recovery codes are displayed only when a one-time session flag is present, and then require an acknowledgement to mark them as shown.\n\n# License\nMIT\n\nCopyright (C) 2026 Helmut Kaufmann (software@mercator.li)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelmutkaufmann%2Fwn-totp2fa-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhelmutkaufmann%2Fwn-totp2fa-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelmutkaufmann%2Fwn-totp2fa-plugin/lists"}