{"id":44634598,"url":"https://github.com/flutter-news-app-full-source-code/auth-inmemory","last_synced_at":"2026-02-14T17:19:49.891Z","repository":{"id":297558959,"uuid":"997163577","full_name":"flutter-news-app-full-source-code/auth-inmemory","owner":"flutter-news-app-full-source-code","description":"An in-memory implementation of the `AuthClient` interface for the Flutter News App Toolkit.","archived":false,"fork":false,"pushed_at":"2026-01-12T18:35:18.000Z","size":77,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-08T08:55:27.878Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flutter-news-app-full-source-code.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2025-06-06T04:14:06.000Z","updated_at":"2025-12-31T19:56:31.000Z","dependencies_parsed_at":"2025-10-24T18:13:21.445Z","dependency_job_id":"a20f22d8-5e53-4870-91cd-ea231dd23911","html_url":"https://github.com/flutter-news-app-full-source-code/auth-inmemory","commit_stats":null,"previous_names":["headlines-toolkit/ht-auth-inmemory","flutter-news-app-full-source-code/ht-auth-inmemory","flutter-news-app-full-source-code/auth-inmemory"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/flutter-news-app-full-source-code/auth-inmemory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutter-news-app-full-source-code%2Fauth-inmemory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutter-news-app-full-source-code%2Fauth-inmemory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutter-news-app-full-source-code%2Fauth-inmemory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutter-news-app-full-source-code%2Fauth-inmemory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flutter-news-app-full-source-code","download_url":"https://codeload.github.com/flutter-news-app-full-source-code/auth-inmemory/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutter-news-app-full-source-code%2Fauth-inmemory/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29450850,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T15:52:44.973Z","status":"ssl_error","status_checked_at":"2026-02-14T15:52:11.208Z","response_time":53,"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-14T17:19:49.476Z","updated_at":"2026-02-14T17:19:49.883Z","avatar_url":"https://github.com/flutter-news-app-full-source-code.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://avatars.githubusercontent.com/u/202675624?s=400\u0026u=dc72a2b53e8158956a3b672f8e52e39394b6b610\u0026v=4\" alt=\"Flutter News App Toolkit Logo\" width=\"220\"\u003e\n  \u003ch1\u003eAuth In-Memory\u003c/h1\u003e\n  \u003cp\u003e\u003cstrong\u003eAn in-memory implementation of the `AuthClient` interface for the Flutter News App Toolkit.\u003c/strong\u003e\u003c/p\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/coverage-13%25-red?style=for-the-badge\" alt=\"coverage\"\u003e\n  \u003ca href=\"https://flutter-news-app-full-source-code.github.io/docs/\"\u003e\u003cimg src=\"https://img.shields.io/badge/LIVE_DOCS-VIEW-slategray?style=for-the-badge\" alt=\"Live Docs: View\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/flutter-news-app-full-source-code\"\u003e\u003cimg src=\"https://img.shields.io/badge/MAIN_PROJECT-BROWSE-purple?style=for-the-badge\" alt=\"Main Project: Browse\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nThis `auth_inmemory` package provides an in-memory implementation of the `AuthClient` interface within the [**Flutter News App Full Source Code Toolkit**](https://github.com/flutter-news-app-full-source-code). It offers a mock authentication client that operates entirely on in-memory data, making it suitable for demonstration purposes, local development, and testing without requiring a live backend. This package simulates various authentication flows, ensuring consistent behavior and robust error handling based on the `auth_client` contract.\n\n## ⭐ Feature Showcase: Simplified Authentication Testing \u0026 Development\n\nThis package offers a comprehensive set of features for managing authentication operations in a simulated environment.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e🧱 Core Functionality\u003c/strong\u003e\u003c/summary\u003e\n\n### 🚀 `AuthClient` Implementation\n- **`AuthInmemory` Class:** A concrete in-memory implementation of the `AuthClient` interface, providing a standardized way to simulate authentication.\n- **Simulated Authentication Flows:** Implements `requestSignInCode`, `verifySignInCode`, `signInAnonymously`, and `signOut` to simulate various authentication processes.\n- **Reactive State Changes:** Provides `authStateChanges` (a stream that emits the current authenticated `User` or `null` on state changes) and `getCurrentUser` to retrieve the current user.\n\n### 🌐 Debugging \u0026 Validation\n- **Privileged Flow Simulation:** Supports an `isDashboardLogin` flag in `requestSignInCode` and `verifySignInCode` to simulate privileged flows, allowing testing of role-specific authentication logic (e.g., only privileged users like `admin@example.com` and `publisher@example.com` are allowed).\n\n- **Token Retrieval:** Includes a `currentToken` getter to retrieve the simulated authentication token for inspection during development.\n\n### 🛡️ Standardized Error Handling\n- **`HttpException` Propagation:** Throws standard `HttpException` subtypes (e.g., `UnauthorizedException`, `NotFoundException`, `AuthenticationException`, `InvalidInputException`) from `core` on simulated failures, ensuring consistent error handling in a testing context.\n\n\u003e **💡 Your Advantage:** This package provides a reliable, in-memory authentication client that simplifies testing and development of authentication-related features. It eliminates the need for external backend dependencies during development, offering immediate feedback and consistent behavior for your authentication logic, especially for complex scenarios like privileged logins.\n\n\u003c/details\u003e\n\n## 🔑 Licensing\n\nThis source code is licensed for commercial use and is provided for local evaluation. A **Lifetime Commercial License** is required for any production or public-facing application.\n\nPlease visit the main [Flutter News App Full Source Code Toolkit](https://github.com/flutter-news-app-full-source-code) organization page to review the full license terms and to purchase.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflutter-news-app-full-source-code%2Fauth-inmemory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflutter-news-app-full-source-code%2Fauth-inmemory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflutter-news-app-full-source-code%2Fauth-inmemory/lists"}