Skip to content

Drop Facebook and guest sign-in; make a failed sign-in visible - #23

Merged
danielhstahl merged 2 commits into
masterfrom
feature/fix_tag
Sep 16, 2026
Merged

danielhstahl merged 2 commits into
masterfrom
feature/fix_tag

Conversation

@danielhstahl

Copy link
Copy Markdown
Member

The deployed demo offered three ways in and none of them worked.

Facebook: no app id exists anywhere for the web build. FacebookAuth.instance.login() was never preceded by an initialize(appId: ...), web/index.html.template has no fb-root or SDK script, and no app id appears in the deployed bundle. The button was incapable of completing a login for anyone.

"Continue as guest": the Firebase project does not permit anonymous sign-in, so the door led to a failed sign-in rather than into the demo.

Google: the only real path, and its failures were invisible. See below.

Removed end to end: the buttons, the ApiEvents values, the bloc handlers, the repository methods and FacebookSignInException, lib/demo_config.dart, and the flutter_facebook_auth dependency together with the test-only flutter_facebook_auth_platform_interface pin that existed for its test.

Why a failed Google sign-in looked like nothing happened: the failure was reported with dart:developer log(), which publishes to the Dart developer-event channel, and a released web build has no listener attached to it, so nothing reached the browser console. The handler then set the state back to ApiNoData -- the very screen the user was already standing on. Press the button: no popup, no error, no visible network activity. That is the reported symptom exactly.

A failure now carries its reason. ApiNoData gained an optional message, StartupPage passes it to Introduction, and the screen renders it under the button. The error is also debugPrint()ed, which does reach the JS console in a release build. A dismissed popup, a rejected credential and a network failure are now distinguishable from the screen, without devtools.

Verification: flutter analyze clean; 134 tests pass (two new bloc tests pin the failure contract, three new widget tests cover the rendered screen); flutter build web --release builds, and the built bundle contains no Facebook string and no guest button.

The deployed demo offered three ways in and none of them worked.

Facebook: no app id exists anywhere for the web build. `FacebookAuth.instance.login()`
was never preceded by an `initialize(appId: ...)`, `web/index.html.template` has no
fb-root or SDK script, and no app id appears in the deployed bundle. The button was
incapable of completing a login for anyone.

"Continue as guest": the Firebase project does not permit anonymous sign-in, so the
door led to a failed sign-in rather than into the demo.

Google: the only real path, and its failures were invisible. See below.

Removed end to end: the buttons, the ApiEvents values, the bloc handlers, the
repository methods and FacebookSignInException, lib/demo_config.dart, and the
flutter_facebook_auth dependency together with the test-only
flutter_facebook_auth_platform_interface pin that existed for its test.

Why a failed Google sign-in looked like nothing happened: the failure was reported
with `dart:developer log()`, which publishes to the Dart developer-event channel,
and a released web build has no listener attached to it, so nothing reached the
browser console. The handler then set the state back to ApiNoData -- the very screen
the user was already standing on. Press the button: no popup, no error, no visible
network activity. That is the reported symptom exactly.

A failure now carries its reason. ApiNoData gained an optional `message`,
StartupPage passes it to Introduction, and the screen renders it under the button.
The error is also debugPrint()ed, which does reach the JS console in a release
build. A dismissed popup, a rejected credential and a network failure are now
distinguishable from the screen, without devtools.

Verification: `flutter analyze` clean; 134 tests pass (two new bloc tests pin the
failure contract, three new widget tests cover the rendered screen);
`flutter build web --release` builds, and the built bundle contains no Facebook
string and no guest button.
@danielhstahl
danielhstahl merged commit 28780c1 into master Sep 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant