Skip to content

FirebaseAuth not storing logged in user #774

@jkwiecien

Description

@jkwiecien

I've implemented Firebase sign in via Google sign in. Flow looks fine most of the time. I monitor it with this piece of code:

    val userFlow = firebaseAuth.authStateChanged
        .onEach { debugLogDefault("user collected: ${it?.uid}") }
        .stateIn(
            repositoryScope,
            SharingStarted.Eagerly,
            null
        )

On emulator or my Samsung S24 it acts normally. After sign in flow logs my logged in userId. After app relaunch same thing happens as expected.

But not on my Pixel 10 Pro... this one, behaves like it is not caching user data after signing in. Flow logs userid after I log in there and this doesn't change until app is alive. After relaunch tho it acts like the user never signed in and userFlow emits null

Devices OS:

  • Pixel is running Android 16.
  • Emulator is running Android 16
  • S24 is running Android 15.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions