Skip to content

Various auth fixes #1141

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 4 commits into from
Aug 20, 2018
Merged

Various auth fixes #1141

merged 4 commits into from
Aug 20, 2018

Conversation

bojeil-google
Copy link
Contributor

  • Fixes exportPrototypeProperties for multiple properties where the last property overrides the previous properties.
  • Fixes fireauth.messagechannel.Sender.
  • Fixes service worker indexedDB on some slow browsers, which was detected in Edge.

…t property overrides the previous properties.
Currently, this does not allow sending multiple messages from the same sender, since the port can only be transferred one time. The implementation has been modified to open a new messagechannel on each message instead.
Note this does not affect indexeddb usage of this utility since a new sender is created each time and one message sent.
…ted in Edge.

Unfortunately, some browsers (detected in Edge) are too slow to detect the first ack event and timeout quickly.
Instead what we can do is assume the following:
1. one service worker activated at one time.
2. The service worker once subscribed to the keyChanged event will not unsubscribe.
So on initialization, the client will ping the service worker when it's ready to get all subscribed events with a long timeout.
If the service worker responds with the keyChanged event, we can deduce that the sw can handle this event.
The next time a change event occurs, we can safely use a long ACK timeout.
@bojeil-google bojeil-google merged commit 86fea68 into master Aug 20, 2018
@bojeil-google bojeil-google deleted the various-auth-fixes branch August 21, 2018 17:58
@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