{"id":44634597,"url":"https://github.com/flutter-news-app-full-source-code/auth-repository","last_synced_at":"2026-02-14T17:19:53.630Z","repository":{"id":296074696,"uuid":"989911514","full_name":"flutter-news-app-full-source-code/auth-repository","owner":"flutter-news-app-full-source-code","description":"A repository that provides an abstraction layer over authentication operations for the Flutter News App Toolkit.","archived":false,"fork":false,"pushed_at":"2026-01-12T04:18:25.000Z","size":59,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-08T08:55:27.777Z","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":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-25T05:11:53.000Z","updated_at":"2026-01-01T16:16:24.000Z","dependencies_parsed_at":"2025-05-28T21:44:23.657Z","dependency_job_id":"27883af7-13bf-43f8-aa9d-4deb215f0d05","html_url":"https://github.com/flutter-news-app-full-source-code/auth-repository","commit_stats":null,"previous_names":["headlines-toolkit/ht-auth-repository","flutter-news-app-full-source-code/ht-auth-repository","flutter-news-app-full-source-code/auth-repository"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/flutter-news-app-full-source-code/auth-repository","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutter-news-app-full-source-code%2Fauth-repository","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutter-news-app-full-source-code%2Fauth-repository/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutter-news-app-full-source-code%2Fauth-repository/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutter-news-app-full-source-code%2Fauth-repository/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-repository/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutter-news-app-full-source-code%2Fauth-repository/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.142Z","updated_at":"2026-02-14T17:19:53.623Z","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 Repository\u003c/h1\u003e\n  \u003cp\u003e\u003cstrong\u003eA repository that provides an abstraction layer over authentication operations 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-100%25-green?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_repository` package contains the `AuthRepository` class, which acts as an abstraction layer over an `AuthClient` implementation (from the `auth_client` package) within the [**Flutter News App Full Source Code Toolkit**](https://github.com/flutter-news-app-full-source-code). Its primary purpose is to provide a clean, business-focused interface for authentication flows, ensuring standardized exception propagation, and handling authentication token persistence using `KvStorageService`. This repository effectively decouples the application's core logic from the specifics of authentication mechanisms and token storage.\n\n## ⭐ Feature Showcase: Business-Focused Authentication Management\n\nThis package offers a comprehensive set of features for managing authentication operations.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e🧱 Core Functionality\u003c/strong\u003e\u003c/summary\u003e\n\n### 🚀 `AuthRepository` Class\n- **`AuthRepository`:** Provides a clean, business-focused interface for authentication-related tasks, abstracting the underlying `AuthClient` implementation.\n- **Complete Authentication Lifecycle:** Offers methods for a full authentication lifecycle, including `authStateChanges` (stream of user authentication state), `getCurrentUser` (retrieves current user), `requestSignInCode` (initiates email+code sign-in), `verifySignInCode` (verifies code, saves token, returns user), `signInAnonymously` (signs in anonymously, saves token, returns user), and `signOut` (signs out user, clears token).\n\n### 🌐 Token Persistence Management\n- **`KvStorageService` Integration:** Manages authentication token persistence internally using an injected `KvStorageService`.\n- **Direct Token Access:** Exposes `saveAuthToken(String token)`, `getAuthToken()`, and `clearAuthToken()` for direct token manipulation, though these are typically handled by the main authentication flow methods.\n\n### 🛡️ Standardized Error Handling\n- **Exception Propagation:** Propagates standardized `HttpException`s (from `core`) from the underlying client and `StorageException`s (from `kv_storage_service`), ensuring consistent and predictable error management across the application layers.\n\n### 💉 Dependency Injection Ready\n- **`AuthClient` \u0026 `KvStorageService` Dependencies:** Requires instances of `AuthClient` (from `auth_client`) and `KvStorageService` (from `kv_storage_service`) via its constructor, promoting loose coupling and testability.\n\n\u003e **💡 Your Advantage:** This package provides a business-focused abstraction for authentication operations, simplifying the integration of user authentication into your application logic. It ensures consistent error handling, manages token persistence, and decouples your core application from specific authentication and storage implementations, enhancing maintainability and flexibility.\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-repository","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflutter-news-app-full-source-code%2Fauth-repository","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflutter-news-app-full-source-code%2Fauth-repository/lists"}