SignOutService class Providers
The one way to sign out of DuTaTo. Every sign-out control (navigation
drawer, Settings → Account, the MFA prompt, account deletion, the forced
password update) calls signOut; nothing else calls auth.signOut()
(test/presentation/providers/sign_out_provider_test.dart enforces it).
It first removes this device's push token from device_tokens, so a
signed-out phone stops receiving the previous account's reminders. That
has to happen while the session still exists: the row is only deletable
by its owner under RLS. On web, and on a native build without Firebase,
that step is a no-op or fails; either way it is logged and never blocks
the sign-out itself. It is also given only a few seconds: on a stalled or
captive network the token lookup or the delete can hang, and the user
would see "Sign out" do nothing.
What must be cleared after sign-out (AI credentials, cached user data)
hangs off the signedOut auth event in main.dart instead, so it also
runs when the session ends for any other reason.
Constructors
-
SignOutService({required Future<
void> forgetDevice(), required Future<void> endSession(), Duration forgetDeviceTimeout = const Duration(seconds: 5)}) -
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
signOut(
) → Future< void> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited