{"id":32344234,"url":"https://github.com/ricksonoliveira/passless-otp","last_synced_at":"2026-06-20T16:31:35.397Z","repository":{"id":296293013,"uuid":"992894491","full_name":"ricksonoliveira/passless-otp","owner":"ricksonoliveira","description":"Passless otp verification API with phone number","archived":false,"fork":false,"pushed_at":"2025-05-29T22:09:10.000Z","size":54,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-24T04:39:50.035Z","etag":null,"topics":["api-rest","elixir","mcp","phoenix"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/ricksonoliveira.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-29T22:05:24.000Z","updated_at":"2025-07-27T11:46:35.000Z","dependencies_parsed_at":"2025-05-29T23:31:43.923Z","dependency_job_id":null,"html_url":"https://github.com/ricksonoliveira/passless-otp","commit_stats":null,"previous_names":["ricksonoliveira/passless-otp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ricksonoliveira/passless-otp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricksonoliveira%2Fpassless-otp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricksonoliveira%2Fpassless-otp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricksonoliveira%2Fpassless-otp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricksonoliveira%2Fpassless-otp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ricksonoliveira","download_url":"https://codeload.github.com/ricksonoliveira/passless-otp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricksonoliveira%2Fpassless-otp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34578089,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"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":["api-rest","elixir","mcp","phoenix"],"created_at":"2025-10-24T04:39:24.886Z","updated_at":"2026-06-20T16:31:35.381Z","avatar_url":"https://github.com/ricksonoliveira.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Passless\n\nA secure, passwordless authentication service built with Elixir and Phoenix.\n\n## 🚀 Features\n\n- Phone number based authentication\n- One-Time Password (OTP) verification\n- JWT token based session management\n- RESTful API design\n- Interactive API documentation with Swagger UI\n\n## 🛠 Setup\n\n### Prerequisites\n\n- Elixir 1.14+ and Erlang/OTP 25+\n- PostgreSQL 13+\n\n### Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/yourusername/passless.git\n   cd passless\n   ```\n\n2. Install dependencies:\n\n   ```bash\n   mix deps.get\n   ```\n\n3. Set up the database:\n\n   ```bash\n   mix ecto.setup\n   ```\n\n4. Start the Phoenix server:\n\n   ```bash\n   mix phx.server\n   ```\n\n5. Visit `http://localhost:4000` in your browser to access the Swagger UI.\n\n## 📚 API Documentation\n\nInteractive API documentation is available at `http://localhost:4000/api/swagger`.\n\n## 🔌 API Endpoints\n\n### Request OTP\n\n```http\nPOST /api/v1/auth/request_otp?phone_number=+1234567890\n```\n\n**Response**\n\n```json\n{\n  \"data\": {\n    \"message\": \"OTP sent successfully\"\n  }\n}\n```\n\n### Verify OTP\n\n```http\nPOST /api/v1/auth/verify_otp?phone_number=+1234567890\u0026code=123456\n```\n\n**Success Response**\n\n```json\n{\n  \"data\": {\n    \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\",\n    \"user\": {\n      \"id\": \"1\",\n      \"phone_number\": \"+1234567890\"\n    }\n  }\n}\n```\n\n**Error Response**\n\n```json\n{\n  \"errors\": {\n    \"detail\": \"Invalid or expired OTP code\"\n  }\n}\n```\n\n## 🏗 Project Structure\n\n```\nlib/\n├── passless/                # Core business logic\n│   ├── auth/                # Authentication context\n│   │   ├── otp.ex           # OTP schema and logic\n│   │   ├── user.ex          # User schema\n│   │   └── auth.ex          # Authentication logic\n│   └── repo.ex              # Database repository\n│\n├── passless_web/           # Web interface\n│   ├── controllers/         # Request handlers\n│   │   └── api/\n│   │       └── v1/         # API version 1\n│   │           └── auth_controller.ex\n│   ├── schemas/             # API schemas\n│   └── router.ex            # Routes definition\n│\n└── passless_web.ex         # Web interface definition\n\ntest/                       # Test files\nconfig/                     # Configuration files\npriv/                       # Private files (migrations, static files)\n```\n\n## 📦 Dependencies\n\n- Phoenix - Web framework\n- Ecto - Database wrapper\n- Guardian - JWT authentication\n- Phoenix Swagger - API documentation\n- Cachex - Caching\n\n## 🧪 Testing\n\n### Running Tests\n\nTo run the entire test suite:\n\n```bash\nmix test\n```\n\n### Test Coverage\n\nThe test suite includes comprehensive tests for both API endpoints:\n\n1. **OTP Request Endpoint** (`/api/v1/auth/request_otp`):\n\n   - Tests for successful OTP request with valid phone number\n   - Tests for error handling with invalid phone number format\n   - Tests for missing phone number parameter\n\n2. **OTP Verification Endpoint** (`/api/v1/auth/verify_otp`):\n   - Tests for successful OTP verification\n   - Tests for error handling with invalid OTP code\n   - Tests for expired OTP codes\n   - Tests for non-existent user verification\n\nAll tests are implemented as integration tests, verifying the complete request/response cycle from the API endpoint through the authentication context to the database.\n\nCheers! 🍷\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricksonoliveira%2Fpassless-otp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fricksonoliveira%2Fpassless-otp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricksonoliveira%2Fpassless-otp/lists"}