{"id":17343441,"url":"https://github.com/firesphere/silverstripe-bootstrapmfa","last_synced_at":"2025-07-18T03:07:45.905Z","repository":{"id":56982205,"uuid":"97219524","full_name":"Firesphere/silverstripe-bootstrapmfa","owner":"Firesphere","description":"Bootstrap your MultiFactor with backup codes and a ready-to-go second-factor authentication","archived":false,"fork":false,"pushed_at":"2019-12-18T23:54:15.000Z","size":180,"stargazers_count":3,"open_issues_count":22,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T08:23:16.596Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Firesphere.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-14T09:54:48.000Z","updated_at":"2020-10-03T23:03:24.000Z","dependencies_parsed_at":"2022-08-21T08:20:33.384Z","dependency_job_id":null,"html_url":"https://github.com/Firesphere/silverstripe-bootstrapmfa","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Firesphere%2Fsilverstripe-bootstrapmfa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Firesphere%2Fsilverstripe-bootstrapmfa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Firesphere%2Fsilverstripe-bootstrapmfa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Firesphere%2Fsilverstripe-bootstrapmfa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Firesphere","download_url":"https://codeload.github.com/Firesphere/silverstripe-bootstrapmfa/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248952350,"owners_count":21188426,"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":["hacktoberfest"],"created_at":"2024-10-15T16:09:24.862Z","updated_at":"2025-04-14T20:11:15.845Z","avatar_url":"https://github.com/Firesphere.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MultiFactor Boostrap for SilverStripe\n\n[![Build Status](https://api.travis-ci.org/Firesphere/silverstripe-bootstrapmfa.svg?branch=master)](https://travis-ci.org/Firesphere/silverstripe-bootstrapmfa)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/Firesphere/silverstripe-bootstrapmfa/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/Firesphere/silverstripe-bootstrapmfa/?branch=master)\n[![codecov](https://codecov.io/gh/Firesphere/silverstripe-bootstrapmfa/branch/master/graph/badge.svg)](https://codecov.io/gh/Firesphere/silverstripe-bootstrapmfa)\n\nThis module aims to help create an multi-factor authentication method for SilverStripe, by bootstrapping an unregistered authenticator with Backup tokens to have a basic start.\n\nCurrent stage is a pretty basic implementation, but it should get you started pretty fast. For example of implementation, see https://github.com/Firesphere/silverstripe-yubiauth/tree/mfa-base\n\n# Installation\n\n`composer require firesphere/bootstrapmfa`\n\n# Usage\n\nFirst, after installation, create your MFA module. (or use an existing one that bolts on top of this one)\n\nThe module in itself does nothing but create the basic requirements for 2-factor token-based backup login. It does not provide active 2FA login methods.\n\nYour Authenticator should extend `BootstrapMFAAuthenticator`\nIn the validation method, if the intended MFA method fails, you can fall back on the `parent::validate()` method.\n\nThis is the Bootstrap Authenticator, that will let people login with one-time text-tokens.\n\nYour second-factor form needs to be it's own form, but has to have a field named `token`, which can fall back via the Bootstrapper..\n\nThis can be done on creation of the Member, via `BootstrapMFAProvider::updateTokens($member)`\n\n# Configuration\n\n```yaml\n\n---\nname: AppMFAAuthenticator\n---\nFiresphere\\BootstrapMFA\\BackupCode:\n  token_limit: 15 # Default amount of tokens\nFiresphere\\BootstrapMFA\\CodeGenerator:\n  length: 6 # Length of the codes\n  type: numeric # Type of the codes, numeric|mixed|characters\n  case: mixed # Casing of the characters. upper|lower|mixed\n\n```\n\nIn the CMS, a new set of tokens can be requested.\n\nIf a user resets its password, the login-screen will show the created new tokens (once)\n\nTokens are stored encrypted and can not be retrieved, only validated.\n\n# Extending\n\nThis module is meant to be extended and not work on it's own. It only supplies fallback codes, like other MultiFactor authentication sites do.\n\nWhen building an MFA module on top of this, a few things are required:\n- Your MFALoginHandler extending BootstrapMFALoginHandler\n- Your MFAProvider implementing the MFAProvider\n- Your authenticator extending BootstrapMFAAuthenticator\n    - Must call the validateBackupCode method to validate the MFA backup codes\n\n\nAn example of how to use this can be found at firesphere/silverstripe-yubiauth\n\nA non-functional demo module is expected to be released soon~ish\n\n\n# License\n  \nThis module is published under BSD 3-clause license, although these are not in the actual classes, the license does apply:\n\nhttp://www.opensource.org/licenses/BSD-2-Clause\n\nCopyright (c) 2017-NOW(), Simon \"Firesphere\" Erkelens\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n  Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n  Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n# Did you read this entire readme? You rock!\n\nPictured below is a cow, just for you.\n```\n\n             /( ,,,,, )\\\n            _\\,;;;;;;;,/_\n         .-\"; ;;;;;;;;; ;\"-.\n         '.__/`_ / \\ _`\\__.'\n            | (')| |(') |\n            | .--' '--. |\n            |/ o     o \\|\n            |           |\n           / \\ _..=.._ / \\\n          /:. '._____.'   \\\n         ;::'    / \\      .;\n         |     _|_ _|_   ::|\n       .-|     '==o=='    '|-.\n      /  |  . /       \\    |  \\\n      |  | ::|         |   | .|\n      |  (  ')         (.  )::|\n      |: |   |;  U U  ;|:: | `|\n      |' |   | \\ U U / |'  |  |\n      ##V|   |_/`\"\"\"`\\_|   |V##\n         ##V##         ##V##\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiresphere%2Fsilverstripe-bootstrapmfa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffiresphere%2Fsilverstripe-bootstrapmfa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiresphere%2Fsilverstripe-bootstrapmfa/lists"}