FirebaseAuth.IdTokenListener

interface FirebaseAuth.IdTokenListener


Listener called when the id token is changed.

Use addIdTokenListener and removeIdTokenListener to register or unregister listeners.

Summary

Public functions

Unit

This method gets invoked in the UI thread on changes in the authentication state:

Public functions

onIdTokenChanged

fun onIdTokenChanged(
    @UnknownInitialization auth: @UnknownInitialization FirebaseAuth
): Unit

This method gets invoked in the UI thread on changes in the authentication state:

  • Right after the listener has been registered
  • When a user is signed in
  • When the current user is signed out
  • When the current user changes
  • When there is a change in the current user's token
Parameters
@UnknownInitialization auth: @UnknownInitialization FirebaseAuth

use it to disambiguate which FirebaseAuth instance the event corresponds to, in the case where you are using more than one at the same time.