You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of the plugin has a method registerAuthStateChangeListener which exposes an authStateDidChangeListener via internal -addAuthStateDidChangeListener:.
The documentation for this event handlers specifies:
Registers a block as an “auth state did change” listener. To be invoked when:
The block is registered as a listener,
A user with a different UID from the current user has signed in, or
The current user has signed out.
However this does not trigger when a user token is auto refreshed.
This seems to require an IDTokenDidChangeListener.
Registers a block as an “ID token did change” listener. To be invoked when:
The block is registered as a listener,
A user with a different UID from the current user has signed in,
The ID token of the current user has been refreshed, or
The current user has signed out.
It's basically the same as auth state but with the extra token refresh.
And unfortunately, without this handler, it's not possible to detect that a user token has been automatically refreshed.
There's a very similar issue with the web sdk that has two separate handlers.
The plugin could expose a registerIDTokenDidChangeListener method that would work fairly similar to the existing auth state listener. Both handlers have similar signatures so would likely be just duplicating the existing functionality with different method signatures.
The text was updated successfully, but these errors were encountered:
Feature request
The current implementation of the plugin has a method
registerAuthStateChangeListener
which exposes an authStateDidChangeListener via internal -addAuthStateDidChangeListener:.The documentation for this event handlers specifies:
However this does not trigger when a user token is auto refreshed.
This seems to require an IDTokenDidChangeListener.
The documentation for the method to add a hander addIDTokenDidChangeListener: states:
It's basically the same as auth state but with the extra token refresh.
And unfortunately, without this handler, it's not possible to detect that a user token has been automatically refreshed.
There's a very similar issue with the web sdk that has two separate handlers.
The plugin could expose a
registerIDTokenDidChangeListener
method that would work fairly similar to the existing auth state listener. Both handlers have similar signatures so would likely be just duplicating the existing functionality with different method signatures.The text was updated successfully, but these errors were encountered: