{"id":29112794,"url":"https://github.com/aprendendo-programacao/totp-authentication","last_synced_at":"2026-04-27T17:33:46.750Z","repository":{"id":296615776,"uuid":"993962350","full_name":"Aprendendo-programacao/totp-authentication","owner":"Aprendendo-programacao","description":"Simple Spring Boot application demonstrating 2FA authentication using TOTP (Time-based One-Time Password), compatible with Google Authenticator, Authy, and similar apps.","archived":false,"fork":false,"pushed_at":"2025-05-31T22:34:35.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-29T11:04:26.192Z","etag":null,"topics":["2fa-security","java","spring","totp"],"latest_commit_sha":null,"homepage":"","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/Aprendendo-programacao.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":"2025-05-31T22:30:05.000Z","updated_at":"2025-05-31T22:35:54.000Z","dependencies_parsed_at":"2025-06-01T09:44:40.385Z","dependency_job_id":"359eac83-3500-4702-95c3-c90765289e2c","html_url":"https://github.com/Aprendendo-programacao/totp-authentication","commit_stats":null,"previous_names":["aprendendo-programacao/totp-authentication"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Aprendendo-programacao/totp-authentication","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aprendendo-programacao%2Ftotp-authentication","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aprendendo-programacao%2Ftotp-authentication/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aprendendo-programacao%2Ftotp-authentication/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aprendendo-programacao%2Ftotp-authentication/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aprendendo-programacao","download_url":"https://codeload.github.com/Aprendendo-programacao/totp-authentication/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aprendendo-programacao%2Ftotp-authentication/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32348048,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T17:12:42.749Z","status":"ssl_error","status_checked_at":"2026-04-27T17:12:41.658Z","response_time":128,"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":["2fa-security","java","spring","totp"],"created_at":"2025-06-29T11:04:42.251Z","updated_at":"2026-04-27T17:33:46.729Z","avatar_url":"https://github.com/Aprendendo-programacao.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TOTP Authentication Demo\n\nThis project is a simple Spring Boot application demonstrating 2FA authentication using TOTP (Time-based One-Time Password), compatible with Google Authenticator, Authy, and similar apps.\n\n## Features\n- User registration and login\n- Enable/disable TOTP 2FA per user\n- TOTP QR code generation for easy setup in authenticator apps\n- PostgreSQL database integration\n\n## Prerequisites\n- Java 17+\n- Maven\n- Docker \u0026 Docker Compose\n\n## Getting Started\n\n### 1. Clone the repository\n```\ngit clone git@github.com:Aprendendo-programacao/totp-authentication.git\ncd totp-authentication\n```\n\n### 2. Start PostgreSQL with Docker Compose\n```\ndocker-compose up -d\n```\nThis will start a PostgreSQL 17.4 instance with the following credentials:\n- Database: `totp_auth_db`\n- User: `totp_user`\n- Password: `totp_pass_123`\n\n### 3. Build and run the application\n```\n./mvnw spring-boot:run\n```\n\nThe application will start on [http://localhost:8080](http://localhost:8080).\n\n## Usage\n1. Register a new user at `/register`.\n2. Login at `/login`.\n3. After login, you will be prompted to enable TOTP 2FA:\n   - Scan the QR code with your authenticator app (Google Authenticator, Authy, etc).\n   - Enter the 6-digit code from your app to activate 2FA.\n4. On subsequent logins, you will be required to enter the TOTP code.\n\n## Notes\n- Passwords are stored in plain text for demo purposes. **Do not use in production!**\n- TOTP validation is implemented according to RFC 6238.\n- The UI is intentionally minimal for demonstration and testing.\n\n## Stopping the Database\nTo stop the PostgreSQL container:\n```\ndocker-compose down\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faprendendo-programacao%2Ftotp-authentication","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faprendendo-programacao%2Ftotp-authentication","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faprendendo-programacao%2Ftotp-authentication/lists"}