utils/github_device_auth/pubspec.yaml
Krzysztof kuhy Rudnicki 14a50b44e2
Some checks are pending
github_device_auth tests / test (push) Waiting to run
palette drift / palette (push) Waiting to run
github_device_auth: configurable endpoints for web builds (v0.2.0)
diet-guard's copy was not cosmetic drift from todo's: it takes the
device-code and token URLs as parameters, because GitHub's device-flow
endpoints send no CORS headers and its desktop **web** build has to route
both through a local proxy (`github_client_factory_web.dart` passes them).
Shipping only todo's hardcoded version would have broken that build the
moment diet-guard adopted the package.

So the package takes the more capable variant: `deviceCodeUrl`/`tokenUrl`
default to GitHub's own URLs, leaving every other consumer unaffected, and
`githubDeviceCodeUrl`/`githubTokenUrl` are exported so callers can
reference the defaults rather than retyping the literals.

23 tests (two new ones pin both the defaults and an override actually
being used for the request), 100% line coverage, clean analyze.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U4Rj3s7K2qzrLNgJqqPhno
2026-08-15 16:01:21 +02:00

24 lines
458 B
YAML

name: github_device_auth
description: >-
GitHub OAuth Device Flow for kuhy's Flutter apps: the auth client and the
modal that drives it. Extracted from four apps that each carried a copy,
two of them byte-identical.
publish_to: 'none'
version: 0.2.0
environment:
sdk: ^3.12.2
dependencies:
flutter:
sdk: flutter
http: ^1.2.0
url_launcher: ^6.3.0
dev_dependencies:
flutter_test:
sdk: flutter
very_good_analysis: ^10.2.0
flutter: