Share authentication providers and dummy services across Flutter apps #4

Closed
opened 2026-09-11 12:56:27 +00:00 by tech · 0 comments
Owner

Goal

Provide shared login and signup providers and dummy services reusable by the sxchnge web and future Flutter mobile app.

Approach

Inspect and adapt Sendico's injected authorization-client and ChangeNotifier provider patterns. Create an independent sxchnge_auth Flutter package with typed requests/results/errors, injectable service contracts, deterministic dummy implementations and login/signup providers. Wire the existing localized form to provider-managed loading, success and failure states.

Acceptance criteria

  • Shared package has no web-only imports, routing, UI, storage or Sendico implementation dependencies.
  • Login and signup providers call injectable services and expose idle/loading/success/error state.
  • Dummy services support success and configurable failure without networking or credential persistence.
  • Duplicate submissions and late responses after reset/disposal are handled safely.
  • App uses the shared package and localizes loading and error feedback in EN/RU.
  • Tests cover provider lifecycle, failures/retry and app integration; format, analyze, frontend tests and web build pass.

Notes

Dummy success is explicitly simulated and does not establish a real session or create an account. Production transport, token handling, verification and backend integration are deferred. Prior tasks remain uncommitted in the local working tree.

Implemented frontend/packages/sxchnge_auth with LoginProvider, SignupProvider, typed domain requests/results/errors, LoginService/SignupService interfaces and configurable DummyLoginService/DummySignupService. Adapted Sendico ChangeNotifier, injected-service and domain-outcome patterns; direct copying would bring its static API, token, device, organization and verification dependencies. The shared package has only a Flutter dependency and no platform-specific imports.

Wired frontend/app to injectable services and providers, with loading/disabled submission, localized success/error/retry feedback, and reset on mode changes. Added package lifecycle tests and app service integration tests. Validation: dart format check passed; flutter analyze passed for sxchnge_auth and app; make test-frontend passed 30 tests (11 auth, 3 theme, 3 theme consumer, 13 app); flutter build web --no-wasm-dry-run passed. Browser dummy login confirmed Russian loading and simulated-success feedback.

Implementation remains uncommitted locally on auth-4; issue remains open pending commit/review.

Delivery

Implementation is now committed and pushed in PR #8. Earlier notes describing uncommitted work are superseded by this delivery. Current implementation branch: auth-4. Review order is #7 → #8 → #9; PRs #7, #8 and #9 are now merged into main.

Validation: all 56 frontend tests, all four Flutter package analyses, formatting checks and app web build passed. Website tests (3), Astro check and website build passed. Durable scope, limitations and workflow are stored in docs/implementation.md, AGENTS.md, frontend/AGENTS.md and .agents/skills/.

Merge completion

Merged through PRs #7, #8 and #9 in dependency order with merge commits. All contributions are on main at abc3f2d. Local main is synchronized and its tree matches the previously validated routing-6 tree exactly. Task completed.

### Goal Provide shared login and signup providers and dummy services reusable by the sxchnge web and future Flutter mobile app. ### Approach Inspect and adapt Sendico's injected authorization-client and ChangeNotifier provider patterns. Create an independent sxchnge_auth Flutter package with typed requests/results/errors, injectable service contracts, deterministic dummy implementations and login/signup providers. Wire the existing localized form to provider-managed loading, success and failure states. ### Acceptance criteria - [x] Shared package has no web-only imports, routing, UI, storage or Sendico implementation dependencies. - [x] Login and signup providers call injectable services and expose idle/loading/success/error state. - [x] Dummy services support success and configurable failure without networking or credential persistence. - [x] Duplicate submissions and late responses after reset/disposal are handled safely. - [x] App uses the shared package and localizes loading and error feedback in EN/RU. - [x] Tests cover provider lifecycle, failures/retry and app integration; format, analyze, frontend tests and web build pass. ### Notes Dummy success is explicitly simulated and does not establish a real session or create an account. Production transport, token handling, verification and backend integration are deferred. Prior tasks remain uncommitted in the local working tree. Implemented frontend/packages/sxchnge_auth with LoginProvider, SignupProvider, typed domain requests/results/errors, LoginService/SignupService interfaces and configurable DummyLoginService/DummySignupService. Adapted Sendico ChangeNotifier, injected-service and domain-outcome patterns; direct copying would bring its static API, token, device, organization and verification dependencies. The shared package has only a Flutter dependency and no platform-specific imports. Wired frontend/app to injectable services and providers, with loading/disabled submission, localized success/error/retry feedback, and reset on mode changes. Added package lifecycle tests and app service integration tests. Validation: dart format check passed; flutter analyze passed for sxchnge_auth and app; make test-frontend passed 30 tests (11 auth, 3 theme, 3 theme consumer, 13 app); flutter build web --no-wasm-dry-run passed. Browser dummy login confirmed Russian loading and simulated-success feedback. Implementation remains uncommitted locally on auth-4; issue remains open pending commit/review. ### Delivery Implementation is now committed and pushed in [PR #8](https://git.sendico.io/tech/sxchnge/pulls/8). Earlier notes describing uncommitted work are superseded by this delivery. Current implementation branch: `auth-4`. Review order is #7 → #8 → #9; PRs #7, #8 and #9 are now merged into `main`. Validation: all 56 frontend tests, all four Flutter package analyses, formatting checks and app web build passed. Website tests (3), Astro check and website build passed. Durable scope, limitations and workflow are stored in `docs/implementation.md`, `AGENTS.md`, `frontend/AGENTS.md` and `.agents/skills/`. ### Merge completion Merged through PRs #7, #8 and #9 in dependency order with merge commits. All contributions are on `main` at `abc3f2d`. Local `main` is synchronized and its tree matches the previously validated `routing-6` tree exactly. Task completed.
tech added the frontend label 2026-09-11 12:56:27 +00:00
tech self-assigned this 2026-09-11 12:56:27 +00:00
tech added this to the SXCHNGE project 2026-09-11 12:56:27 +00:00
tech added reference auth-4 2026-09-11 12:56:45 +00:00
tech changed reference from auth-4 to auth-4 2026-09-11 13:38:41 +00:00
tech closed this issue 2026-09-11 13:46:18 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: tech/sxchnge#4