firebase_auth_watchos 0.2.0
firebase_auth_watchos: ^0.2.0 copied to clipboard
watchOS implementation of firebase_auth, bridging the Firebase Apple SDK (FirebaseAuth) over dart:ffi for email, anonymous, and token sign-in.
0.2.0 #
- Breaking: works with
firebase_auth7.x, and needs it. The package now depends onfirebase_core: ^5.0.0(was^4.0.0) andfirebase_auth_platform_interface: ^9.1.1(was^9.0.5), the first version of the platform interface forfirebase_core5.x. An app that stays onfirebase_auth6.x keeps 0.1.1. - The watch still links the Firebase Apple SDK 11.x through
watchos/Package.swift. The newer SDK thatfirebase_auth7.x uses on iOS and macOS does not apply to it. authStateChanges,idTokenChangesanduserChangesno longer repeat their first value for the call the SDK makes to each listener when the plugin installs it, on the first native call for an app. With 0.1.1 a stream subscribed before any other auth call could emit the current user, or null, a second time. The streams now leave that call out when it reports the value they last emitted, and emit it when the user changed before it ran: forauthStateChangesit can be the only report of such a sign-out.idTokenChangesanduserChangescan still emit a signed-in user twice when the SDK restores or signs in that user while the plugin installs its listeners;firebase_authusually emits it once there.- The same streams report a signed-out state once, as
firebase_auth7.0.1 does: a null is not emitted when the last value emitted was null too. User.updateProfile:firebase_auth7.0.1 passes only the fields it is given, so an omitted field now keeps its value on the watch; this package already applied only the fields present in the request. A field given asnullis forwarded to the SDK's profile change request. The Firebase Apple SDK then clears it on the local user and does not send it to the server, as on iOS. A new test checks that thenullreaches the native layer.- README: the install snippet names
firebase_core: ^5.1.0,firebase_auth: ^7.0.1and this version, and says thatsendPasswordResetEmail,sendEmailVerificationandverifyBeforeUpdateEmaildo not pass on theirActionCodeSettingsyet. - Example:
pubspec.yamlnamesfirebase_auth: ^7.0.1,firebase_core: ^5.1.0andfirebase_messaging: ^17.0.1. No native code changed, and the example was not rebuilt on the Simulator for this version.
0.1.1 #
- API docs and comments say "release" for handing native memory back.
- Example:
pubspec.yamlnamesfirebase_auth: ^6.7.0instead ofany.
0.1.0 #
- Released with flutter-watchos 0.1.0. The code is the same as in the last published build.
- The watchOS implementation of
firebase_auth: a dart:ffi bridge over the Firebase Apple SDK (FirebaseAuth) implementing the sign-in flows a watch can run (anonymous, email/password, email link, custom token), the current-user snapshot and theauthStateChanges,idTokenChangesanduserChangesstreams, user management (ID tokens, profile updates, verification emails, password updates, delete), and password-reset and action-code handling. - Provider/OAuth sign-in, phone auth and multi-factor flows are not
supported: they need UI the watch cannot present.
User.reauthenticateWithCredential,User.linkWithCredential,User.unlink,sendSignInLinkToEmail,checkActionCodeandsetSettingsare not implemented yet. - Scaffolded with
flutter-watchos plugin port, then finished by hand. - Links the Firebase Apple SDK through the CLI's support for external SwiftPM dependencies.
- Checked on the watchOS 27.0 Simulator: the example builds and starts, and the host unit tests pass. Not yet run on a physical Apple Watch.