Skip to content

onToggleRecoverPassword not called when tapping “Back to sign in”, causing persistent “Recover Password” state #147

@m-pastuszek

Description

@m-pastuszek

Bug report

Describe the bug

When using SupaEmailAuth, the onToggleRecoverPassword callback is correctly invoked with true after tapping “Forgot password”. However, tapping “Back to sign in” does not trigger onToggleRecoverPassword with false. As a result, the parent widget remains in the “Recover Password” state (e.g., the screen title or other UI driven by this callback stays stuck on password reset).

To Reproduce

SupaEmailAuth(
  onToggleSignIn: (isSignIn) {
    debugPrint('isSignIn: $isSignIn');
  },
  onToggleRecoverPassword: (isRecoverPassword) {
    debugPrint('isRecoverPassword: $isRecoverPassword');
  }
);

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Render SupaEmailAuth with both onToggleSignIn and onToggleRecoverPassword callbacks and drive parent UI state based on them.
  2. Tap “Forgot password” to enter the password recovery flow.
  3. Observe onToggleRecoverPassword (true) is called.
  4. Tap “Back to sign in”.
  5. Observe onToggleRecoverPassword (false) is not called.

Expected behavior

Tapping “Back to sign in” should invoke onToggleRecoverPassword(false), allowing the parent widget to update its UI and exit the password recovery state.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions