Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FirebaseAuth.instance.currentUser always null on windows app flutter !! #12734

Closed
1 task done
Hmida71 opened this issue May 1, 2024 · 3 comments
Closed
1 task done
Labels
Needs Attention This issue needs maintainer attention. platform: windows Issues / PRs which are specifically for Windows. plugin: auth resolution: duplicate This issue or pull request already exists type: bug Something isn't working

Comments

@Hmida71
Copy link

Hmida71 commented May 1, 2024

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

Core, Auth

Which platforms are affected?

Windows

Description

FirebaseAuth.instance.currentUser always null on windows app flutter ?

Reproducing the issue

I am seeing this issue too on Windows. After I sign in/email-pass sign in, hot restarting the app returns currentUser as null. This also happens on subsequent app runs too.

In my case, it is always null, even after few seconds. I tried this:

FirebaseAuth.instance.authStateChanges().listen((event) {
      print('Auth state changed: $event');
});
and this : 
final userGoogle = FirebaseAuth.instance.currentUser;
    print(userGoogle);
    if (userGoogle == null) {
      isLogin = false;
    } else {
      isLogin = true;
    }

and it only prints null and never prints again. ??

Firebase Core version

2.30.0

Flutter Version

3.19.5

Relevant Log Output

No response

Flutter dependencies

Expand Flutter dependencies snippet
Replace this line with the contents of your `flutter pub deps -- --style=compact`.

Additional context and comments

No response

@Hmida71 Hmida71 added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels May 1, 2024
@TarekkMA TarekkMA added plugin: auth platform: windows Issues / PRs which are specifically for Windows. labels May 2, 2024
@TarekkMA
Copy link
Contributor

TarekkMA commented May 2, 2024

@Hmida71 Thank you for reporting this issue.

Can you try this on andoird or ios and see if you have the same issue?

@TarekkMA TarekkMA added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels May 2, 2024
@Hmida71
Copy link
Author

Hmida71 commented May 2, 2024

@Hmida71 Thank you for reporting this issue.

Can you try this on andoird or ios and see if you have the same issue?

No just on Desktop apps

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels May 2, 2024
@russellwheatley
Copy link
Member

This is a duplicate of this issue: #12055

closing out in favour of tracking there

@russellwheatley russellwheatley added the resolution: duplicate This issue or pull request already exists label May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Attention This issue needs maintainer attention. platform: windows Issues / PRs which are specifically for Windows. plugin: auth resolution: duplicate This issue or pull request already exists type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants