{"id":21980612,"url":"https://github.com/stormpath/stormpath-spring-boot-mfa-example","last_synced_at":"2025-04-30T05:04:11.161Z","repository":{"id":66357039,"uuid":"81258973","full_name":"stormpath/stormpath-spring-boot-mfa-example","owner":"stormpath","description":null,"archived":false,"fork":false,"pushed_at":"2017-03-06T19:24:26.000Z","size":1317,"stargazers_count":10,"open_issues_count":0,"forks_count":3,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-30T05:04:10.659Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/stormpath.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}},"created_at":"2017-02-07T22:00:28.000Z","updated_at":"2020-07-01T16:09:26.000Z","dependencies_parsed_at":"2023-02-22T06:30:59.064Z","dependency_job_id":null,"html_url":"https://github.com/stormpath/stormpath-spring-boot-mfa-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stormpath%2Fstormpath-spring-boot-mfa-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stormpath%2Fstormpath-spring-boot-mfa-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stormpath%2Fstormpath-spring-boot-mfa-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stormpath%2Fstormpath-spring-boot-mfa-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stormpath","download_url":"https://codeload.github.com/stormpath/stormpath-spring-boot-mfa-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251644843,"owners_count":21620632,"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-29T17:12:23.893Z","updated_at":"2025-04-30T05:04:11.155Z","avatar_url":"https://github.com/stormpath.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"#Stormpath is Joining Okta\n\nWe are incredibly excited to announce that [Stormpath is joining forces with Okta](https://stormpath.com/blog/stormpaths-new-path?utm_source=github\u0026utm_medium=readme\u0026utm-campaign=okta-announcement). Please visit [the Migration FAQs](https://stormpath.com/oktaplusstormpath?utm_source=github\u0026utm_medium=readme\u0026utm-campaign=okta-announcement) for a detailed look at what this means for Stormpath users.\n\nWe're available to answer all questions at [support@stormpath.com](mailto:support@stormpath.com).\n\n## Stormpath Spring Boot MFA Example\n\nThis example demonstrates a flow where an multi-factor authentication (MFA) confirmation is required after each login and before gaining access to protected pages.\n\nIn particular, it uses [TOTP](https://en.wikipedia.org/wiki/Time-based_One-time_Password_Algorithm) for MFA. And, it uses The [Google Authenticator](https://en.wikipedia.org/wiki/Google_Authenticator) [QR Code](https://en.wikipedia.org/wiki/QR_code) to set the shared secret. \nSo, you'll want to grab a Google Authenticator compliant app for your smart phone.\n\nTL;DR:\n\n1. [Register](https://api.stormpath.com/register) for Stormpath\n2. Save your apiKey file (Found by following the Manage API Keys link in the admin console) to: `~/.stormpath/apiKey.properties`\n3. `mvn clean install`\n4. `mvn spring-boot:run`\n5.  Browse to: [http://localhost:8080](http://localhost:8080)\n\n**Note:** Multi-Factor Authentication is only available with paid Stormpath plans. \nFor more information please see [Stormpath’s Pricing Page](https://stormpath.com/pricing).\n\nYou can see this example in action at [https://stormpath-mfa-example.herokuapp.com](https://stormpath-mfa-example.herokuapp.com)\n\nThe flow looks like this:\n\n![mfa login flow](images/MFAFlow.png)\n\nThe diagram above is not as complex as it may seem. You can think of the left and right sides as two different flows.\n\nOn the right side of the diagram, the user has not logged in yet.\n\nOn the left side of the diagram, the use has already logged in.\n\nBoth flows ensure that (a) the user sets up MFA and (b) the user has validated the latest token code after logging in, but before getting to an authenticated page.\n\nThis example takes advantage of Stormpath's [postLoginHandler](https://docs.stormpath.com/java/spring-boot-web/login.html#post-login-handler) that all of our integrations support.\n\nHere's the typical flow:\n\n1. Home Page - Unauthenticated\n\n    ![home page unauth](images/HomePageUnauthenticated.png)\n\n2. Login\n\n    ![login](images/Login.png)\n\n3. Create Google Authenticator MFA\n\n    ![create ga mfa](images/CreateGAMFA.png)\n\n4. Verify MFA Code\n\n    ![verify ga code](images/VerifyMFACode.png)\n\n    ![ga app](images/GAApp.png)\n\n5. Home Page - Authenticated\n\n    ![home page auth](images/HomePageAuthenticated.png)\n\n6. Logout\n\n    ![home page unauth](images/HomePageUnauthenticated.png)\n\n7. Login\n\n    ![login](images/Login.png)\n\n8. Confirm Latest MFA code (No QR Code this time)\n\n    ![confirm mfa code](images/MFAConfirmLatest.png)\n\n9. Home Page - Authenticated\n\n    ![home page auth](images/HomePageAuthenticated.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstormpath%2Fstormpath-spring-boot-mfa-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstormpath%2Fstormpath-spring-boot-mfa-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstormpath%2Fstormpath-spring-boot-mfa-example/lists"}