Skip to content

firebase-ios-sdk/1499: Restart streams on any token change. #1120

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

Merged
merged 2 commits into from
Aug 15, 2018

Conversation

mikelehen
Copy link
Contributor

See firebase/firebase-ios-sdk#1499

This reworks our UserListener into a CredentialChangeListener which
fires on any token change, even if the User did not change. This allows
us to restart our streams (but not switch mutation queues, etc.) on token
changes.

See firebase/firebase-ios-sdk#1499

This reworks our UserListener into a CredentialChangeListener which
fires on any token change, even if the User did not change. This allows
us to restart our streams (but not switch mutation queues, etc.) on token
changes.
* This isn't actually necessary since the UID never changes, but we use this
* to verify the listen contract is adhered to in tests.
*/
private userListener: UserListener | null = null;
private listener: CredentialChangeListener | null = null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We call this a changeListener below. Could we make these consistent?

mikelehen pushed a commit to firebase/firebase-ios-sdk that referenced this pull request Aug 14, 2018
[Port of firebase/firebase-js-sdk#1120]

Fixes #1499.

This reworks our "user listener" into a "credential change listener" that
fires on any token change, even if the User did not change. This allows
us to restart our streams (but not switch mutation queues, etc.) on token
changes.
mikelehen added a commit to firebase/firebase-ios-sdk that referenced this pull request Aug 15, 2018
[Port of firebase/firebase-js-sdk#1120]

Fixes #1499.

This reworks our "user listener" into a "credential change listener" that
fires on any token change, even if the User did not change. This allows
us to restart our streams (but not switch mutation queues, etc.) on token
changes.
@mikelehen mikelehen merged commit 4ec654d into master Aug 15, 2018
@mikelehen mikelehen deleted the mikelehen/handle-all-token-changes branch August 15, 2018 16:03
@firebase firebase locked and limited conversation to collaborators Oct 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants