Skip to content

Implement cross-window browser events for auth-next #3631

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 7 commits into from
Aug 25, 2020

Conversation

avolkovi
Copy link
Contributor

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Aug 13, 2020

💥 No Changeset

Latest commit: 3a324fb

Merging this PR will not cause any packages to be released. If these changes should not cause updates to packages in this repo, this is fine 🙂

If these changes should be published to npm, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Aug 13, 2020

Binary Size Report

Affected SDKs

No changes between base commit (c1e9229) and head commit (4fc04e9).

Test Logs

@avolkovi avolkovi force-pushed the avolkovi/persistence-events branch 4 times, most recently from 570191b to 73aec54 Compare August 18, 2020 00:29
@avolkovi avolkovi marked this pull request as ready for review August 18, 2020 00:29

it('should update tokens if they have changed', async () => {
const userObj = user.toJSON();
(userObj['stsTokenManager'] as any)['accessToken'] = 'new-access-token';
Copy link
Contributor

Choose a reason for hiding this comment

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

Have you run this using yarn test ? This should blow up the linter step

Copy link
Contributor Author

Choose a reason for hiding this comment

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

seems to pass somehow....

@avolkovi avolkovi force-pushed the avolkovi/persistence-events branch from 73aec54 to 6ff492c Compare August 25, 2020 19:53
@avolkovi avolkovi force-pushed the avolkovi/persistence-events branch from 6ff492c to d13b99c Compare August 25, 2020 19:57
await new Promise(resolve => setTimeout(resolve, 100));

expect(callback).not.to.have.been.called;
(persistence as any)['pendingWrites'] = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

This should also break the inter

Copy link
Contributor Author

Choose a reason for hiding this comment

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

see above, seems to work for some reason

@avolkovi avolkovi merged commit 1504aa1 into auth-next Aug 25, 2020
@avolkovi avolkovi deleted the avolkovi/persistence-events branch August 25, 2020 21:50
sam-gc pushed a commit that referenced this pull request Sep 1, 2020
* Implement cross-window browser events for auth-next

* Split out local & session storage

* Add persistence events to indexed DB

* Add some tests & fix a couple issues with local storage events

* Add tests for AuthImpl._onStorageEvent and fix getIdToken to trigger
correctly

* Merge conflicts

* PR feedback
@firebase firebase locked and limited conversation to collaborators Sep 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants