Skip to content

Implement SessionToken Persistence #8388

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

Closed
wants to merge 286 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
286 commits
Select commit Hold shift + click to select a range
f2c1828
Bump firebase (#7477)
hsubox76 Jul 18, 2023
3883028
Adding auth state ready() ax (#7384)
AngelAngelXie Jul 18, 2023
bd24be9
Various bloom filter logic cleanup ported from Android (#7474)
dconeybe Jul 20, 2023
a303bd3
Version Packages (#7478)
google-oss-bot Jul 20, 2023
bb48b9f
Firestore: query.test.ts: use a different Firestore instance instead …
dconeybe Jul 24, 2023
1796149
Run E2E tests on canary releases #7475
hsubox76 Jul 24, 2023
0fb42ee
Increase GHA artifact retention from 2 to 14 days (#7495)
DellaBitta Jul 25, 2023
70be2fe
Firestore: query_engine.test.ts: fix logic that checks `configureCsi`…
dconeybe Jul 31, 2023
eef4ff1
Pin the webdriver version in Firefox test to avoid install failures. …
prameshj Jul 31, 2023
f1c850f
Export internal interface PrivateSettings for console (#7492)
qtz1 Aug 1, 2023
1e148d6
Firestore: equality_matcher.ts: fix missing custom assertion failure …
dconeybe Aug 3, 2023
cd69f6b
Fix: Aggregate query order-by normalization (#7507)
MarkDuckworth Aug 4, 2023
f8163bd
Separate the implementation of initializeRecaptchaConfig (#7515)
Aug 4, 2023
2ae4353
Setup firestore tests for named db (#7505)
wu-hui Aug 4, 2023
1b87196
Add support for validating passwords against the password policy in a…
ch5zzy Aug 7, 2023
820ecce
fix: Update proto loader (#7520)
tom-andersen Aug 8, 2023
9302a2d
Raise error if calling initializeRecaptchaConfig in node env (#7284)
Aug 8, 2023
74c529b
Skip large sized bloom filter golden tests (#7537)
milaGGL Aug 8, 2023
1860fb4
Updates to our contributing guidance (#7526)
DellaBitta Aug 10, 2023
3466bba
Fix and skip flaky Firestore tests (#7552)
wu-hui Aug 14, 2023
ce1ef52
Upgrade webpack to v5 (#7540)
hsubox76 Aug 14, 2023
34c8666
[Auth] Fix auth event uncancellable bug (#7498)
omochi Aug 14, 2023
ecfc80c
Fix changeset checker to write to github output correctly (#7554)
hsubox76 Aug 15, 2023
a508051
Update CODEOWNERS (#7562)
hsubox76 Aug 16, 2023
4064331
Setup separate GA jobs for firestore (#7523)
wu-hui Aug 16, 2023
76a7f1f
Firestore: testing_hooks.ts: move some logic into testing_hooks_spi.t…
dconeybe Aug 16, 2023
16ebdff
Fix webpack env variable settings (#7557)
hsubox76 Aug 16, 2023
80f3c68
Include full output from mocha/karma in CI (#7567)
dconeybe Aug 16, 2023
63d2c13
Run 'Firestore Integration Tests' jobs in parallel (#7558)
dconeybe Aug 17, 2023
a618f96
Polish new Firestore GA jobs (#7568)
wu-hui Aug 17, 2023
9d2b3b5
Version Packages (#7560)
google-oss-bot Aug 17, 2023
ed4f09c
Fix how we enable fetch streams. (#7569)
wu-hui Aug 18, 2023
3718bd8
Remove dependency on @react-native-async-storage/async-storage (#7570)
hsubox76 Aug 22, 2023
6574ab5
Version Packages (#7579)
google-oss-bot Aug 22, 2023
88cf443
Firestore: enable/disablePersistentCacheIndexAutoCreation() added, bu…
dconeybe Aug 24, 2023
852246f
Fix flaky auth webdriver tests and pin Chrome v114 (#7582)
NhienLam Aug 24, 2023
f5def6d
Firestore: deleteAllPersistentCacheIndexes() added, but hidden for no…
dconeybe Aug 25, 2023
48fe8d2
Fix webchannel wrapper overrides (#7593)
wu-hui Aug 29, 2023
d1e1c1e
Version Packages (#7595) (#7600)
DellaBitta Aug 31, 2023
7a68a98
Update some minor dependencies. (#7592)
DellaBitta Sep 1, 2023
b5bf072
Add test cases for existence filter with updated/added documents (#7457)
milaGGL Sep 5, 2023
77fd796
Firestore: Move local store index auto-creation unit tests into the p…
dconeybe Sep 5, 2023
1355228
Firestore: Release enablePersistentCacheIndexAutoCreation() and relat…
dconeybe Sep 5, 2023
6e3d75e
Firestore: Set DEFAULT_RELATIVE_INDEX_READ_COST_PER_DOCUMENT to 8 in …
dconeybe Sep 6, 2023
f4c5374
Firestore: Increase test coverage for persistent cache indexing (#7613)
dconeybe Sep 8, 2023
1099db9
Multiple inequality support (#7453)
milaGGL Sep 13, 2023
fea44cf
[CI] update chrome install steps for Auth builds. (#7602)
DellaBitta Sep 14, 2023
2992750
Version Packages (#7626)
google-oss-bot Sep 14, 2023
3e46b6f
Fix compat doc gen (#7629)
hsubox76 Sep 15, 2023
8929e76
Fix MIEQ failure against Emulator on CI (#7637)
milaGGL Sep 21, 2023
e6b6469
Clean up and re-enable some OR query tests. (#7638)
ehsannas Sep 26, 2023
550c874
Fix to test-all .github workflow yaml file. (#7640)
DellaBitta Sep 28, 2023
eac7480
Add IteratedDataSnapshot to compat toc (#7662)
hsubox76 Sep 28, 2023
5d98de6
types(firestore): make `withConverter` retro compatible (#7441)
posva Sep 29, 2023
b20077d
Testing composite index queries against production (#7632)
milaGGL Oct 4, 2023
f39cc84
sum avg (#7502)
MarkDuckworth Oct 10, 2023
eac0245
Version Packages (#7689)
google-oss-bot Oct 12, 2023
073ce82
Fix composite index testing build bug (#7682)
milaGGL Oct 13, 2023
86663d8
MIEQ: add negative test cases (#7680)
milaGGL Oct 13, 2023
5999300
Create handleRecaptchaFlow helper method (#7666)
Oct 13, 2023
22e0475
Add more named db test verification. (#7695)
tom-andersen Oct 16, 2023
2312ac6
Revert text change from PR 6526 (#7696)
tom-andersen Oct 16, 2023
e86709a
Get reCAPTCHA Enterprise enforcement state of a provider (#7685)
NhienLam Oct 18, 2023
1c60b67
Fix typo in JSDoc (#7594)
luc122c Oct 18, 2023
2fb72aa
Update test-changed-firestore-integration.yml (#7708)
milaGGL Oct 20, 2023
9f44f9b
Fix FetchProvider in non-browser environment (#7634)
ocavue Oct 23, 2023
78cd41b
Move sum&avg composite index tests to composite_index_query.test.ts (…
milaGGL Oct 25, 2023
21c2849
Add export for totpMultifactorGenerator for react native bundle (#7720)
bhparijat Oct 26, 2023
255b760
Version Packages (#7722)
google-oss-bot Oct 26, 2023
17f61e0
Rolling back the use of useFetchStreams, which has lead to hanging qu…
MarkDuckworth Oct 27, 2023
9347a2d
Version Packages (#7732)
google-oss-bot Oct 27, 2023
953b01e
Support converter that returns undefined. (#7738)
tom-andersen Oct 30, 2023
9560afb
Update the linkWithCredential API to call the signUp endpoint (#7692)
prameshj Nov 1, 2023
0bdd88e
Add unit tests for handleRecaptchaFlow (#7699)
Nov 1, 2023
1c99b71
Implement token revocation public api (#7745)
NhienLam Nov 6, 2023
0fa3ba9
[Heartbeat Service] Guard against empty heartbeat caches. (#7749)
DellaBitta Nov 7, 2023
aa11ae2
Version Packages (#7759)
google-oss-bot Nov 9, 2023
f5109ae
Replace node-fetch dependency with undici (#7705)
DellaBitta Nov 12, 2023
15c7b78
Comment changes for OSS (#7778)
DellaBitta Nov 14, 2023
bdb8764
Move env set of Node Options from shell commands to Workflow configua…
DellaBitta Nov 15, 2023
342ee0b
Expose INVALID_LOGIN_CREDENTIALS as auth/invalid-credential error. (#…
prameshj Nov 15, 2023
3495fd4
Tag PID to BQ delivery metric (#7788)
zwu52 Nov 16, 2023
11f37cc
Hanging query follow up (#7771)
MarkDuckworth Nov 17, 2023
5056302
Fix docs unnecessarily undergo limbo resolution while resuming query …
milaGGL Nov 22, 2023
e3f8196
Disable all webdriver redirect tests (#7801)
NhienLam Nov 22, 2023
c201785
[Heartbeat Service] More null service protections added to triggerHea…
DellaBitta Nov 22, 2023
aac5ce6
Version Packages (#7777)
google-oss-bot Nov 27, 2023
349c07f
[App Check] Install catch handler for promise in Deferred. (#7822)
DellaBitta Nov 29, 2023
bc1e410
[Auth] Detect if IndexedDB returns an empty array in platform_browser…
DellaBitta Nov 29, 2023
2efa4f1
Add app-check-interop-types dependency to database (#7827)
hsubox76 Nov 30, 2023
7edcc27
Re-enable Auth webdriver tests (#7797)
Dec 2, 2023
9430654
Improve performance by using getAll on IDBIndex. (#6975)
tom-andersen Dec 5, 2023
cd42893
Version Packages (#7836)
google-oss-bot Dec 5, 2023
9c7e8f3
Add check against firestore nightly (#7851)
wu-hui Dec 11, 2023
80aa3bd
Fix: Leak of grpc resources on terminate. (#7847)
MarkDuckworth Dec 11, 2023
2358106
Firestore: Re-write sample code in FirestoreDataConverter docs (#7673)
dconeybe Dec 12, 2023
642337b
Fix E2E runtime - pin Firebase Tools, node 18 runtime (#7865)
DellaBitta Dec 12, 2023
bebf607
Update isEqual for arrayUnion, arrayRemove, and increment (#7861)
milaGGL Dec 14, 2023
5d64deb
Firestore: add TODO comments about removing special 'missing index' t…
dconeybe Dec 14, 2023
60dd0dc
Firestore: Improve test name of "missing index" error message tests (…
dconeybe Dec 14, 2023
ad65638
[Auth CI] Log warning if chrome version has changed (#7872)
DellaBitta Dec 15, 2023
b1eff9c
Use canonifyQuery rather than canonifyTarget in unit test. (#7051)
ehsannas Dec 15, 2023
e3dd45d
Improved handling of reads after writes in transactions if the get is…
MarkDuckworth Dec 15, 2023
bbe6e45
Add size report for Firestore read & write w/ persistence (#7880)
dconeybe Dec 15, 2023
6715368
Fix documentation links for function overloads and improve readabilit…
MarkDuckworth Dec 15, 2023
5c72acc
[E2E CI] Update firebase-tools to v13.0.2 (#7883)
DellaBitta Dec 18, 2023
07c46f6
Upgrade types/node dev depdendency to 16.18.68 (#7878)
DellaBitta Dec 18, 2023
6d57557
[Docs] Documentation generation instructions updated in CONTRIBUTING.…
DellaBitta Dec 18, 2023
3b5b48e
Update CODEOWNERS for auth (#7867)
prameshj Dec 18, 2023
ea4d481
Update invokeRun*QueryRpc functions to support paths with special cha…
MarkDuckworth Dec 20, 2023
ec8455b
Update the JSDoc for enableIndexedDbPersistence (#7852)
milaGGL Dec 21, 2023
e6776b5
Firestore: fix typo in log messages: IndexBackiller -> IndexBackfille…
dconeybe Jan 2, 2024
583d570
Firestore: firestore_client.ts: async getConfiguration() -> get confi…
dconeybe Jan 2, 2024
943d978
Firestore: component_provider.ts: cleanup terminate() functions (#7906)
dconeybe Jan 2, 2024
d3525c4
Firestore: local_serializer.ts: change toDbIndexState() argument from…
dconeybe Jan 2, 2024
34352af
Catch possible Safari error (#7890)
hsubox76 Jan 3, 2024
fa7aea1
Disable nightly run with PR (#7876)
wu-hui Jan 4, 2024
3f4b808
Add size report for Firestore client-side indexing (#7904)
dconeybe Jan 4, 2024
b46c835
Firestore: local_store_indexeddb.test.ts: fix spurious errors when ca…
dconeybe Jan 5, 2024
5182eec
Firestore: Choose DEFAULT_RELATIVE_INDEX_READ_COST_PER_DOCUMENT value…
dconeybe Jan 8, 2024
88589a7
Firestore: Small Count API documentation improvements (#7933)
dconeybe Jan 10, 2024
9d5ea54
Firestore: FirestoreDataConverter doc and test improvements (#7932)
dconeybe Jan 17, 2024
187557e
Version Packages (#7955)
google-oss-bot Jan 18, 2024
4b955c2
Fix errors in reporting errors in the "Check changeset vs changed fil…
dconeybe Jan 19, 2024
8910cca
Fix isSafari() throwing on React Native (fixes #7962) (#7963)
Yonom Jan 19, 2024
a647cb4
[Auth] Reproduce CI test compilation error. (#7966)
DellaBitta Jan 23, 2024
093eed7
Fixed issue where queryConstraint.type was undefined (#7973)
maneesht Jan 23, 2024
ba72521
Update CODEOWNERS for rtdb (#7977)
maneesht Jan 23, 2024
2a80f9d
Add web-extension package that strips external JS loading (#7766)
NhienLam Jan 24, 2024
95872be
Add tests for bundle (#7980)
cherylEnkidu Jan 25, 2024
2e393e5
docs: Fix 3 typos (#7810)
AhmedBaset Jan 26, 2024
ea939a4
[Analytics] Add ad_personalization and ad_user_data constent settings…
DellaBitta Jan 26, 2024
de2c12e
A changeset for additions to the Analytics ConsentSettings interface.
DellaBitta Jan 29, 2024
cf35ab9
Catch transaction.done errors (#7984)
hsubox76 Jan 29, 2024
cb02247
A changeset for additions to the Analytics ConsentSettings interface.…
DellaBitta Jan 29, 2024
849509b
update page-view links in analytics docs (#7994)
hsubox76 Jan 30, 2024
b955669
Add changeset for Web-Extension package (#8001)
NhienLam Jan 31, 2024
e2356dd
Version Packages (#7995)
google-oss-bot Feb 1, 2024
98c8e1e
update chromedriver to 116 and update url (#8045)
hsubox76 Feb 27, 2024
6c109c1
Bump undici due to security issue (#8044)
hsubox76 Feb 27, 2024
39af00f
Version Packages (#8046)
google-oss-bot Feb 28, 2024
9825463
Enforce authTokenSyncURL being a path and not a url. (#8056)
hsubox76 Mar 6, 2024
afbec2d
Update CI node.js versions to 20.x (#8055)
DellaBitta Mar 8, 2024
23c0568
Fix glob pattern to work with Node 20 and its NPM version (#8059)
hsubox76 Mar 8, 2024
87954b4
Prevent using authTokenSyncURL if the string begins with a double sla…
hsubox76 Mar 11, 2024
f04092d
snapshot listeners source from cache (#7982)
milaGGL Mar 11, 2024
4fb729b
Version Packages (#8063)
google-oss-bot Mar 14, 2024
45e033c
Enable previously failing `(Firestore) Node.js and Browser (Chrome) T…
DellaBitta Mar 14, 2024
78c0b05
Run npm pkg fix on all packages (#8079)
hsubox76 Mar 20, 2024
ea401d0
More complex check for authTokenSyncUrl (#8076)
jamesdaniels Mar 21, 2024
398cb2e
Dependabot transitive dependency rollup (#8088)
DellaBitta Mar 22, 2024
4947cd6
[ServerApp] Firebase Server App feature branch (#8005)
DellaBitta Mar 23, 2024
1d2a8a3
dependabot/npm_and_yarn/e2e/webpack-dev-middleware-5.3.4 (#8095)
DellaBitta Mar 25, 2024
2ded593
Add a changset to the transitive dependency update (#8097)
DellaBitta Mar 26, 2024
c3d4408
Fix CSI timestamp issue (#8090)
milaGGL Mar 28, 2024
96c2c9a
Version Packages (#8101)
google-oss-bot Mar 28, 2024
c9ee783
Move MIEQ tests to composite index file (#7999)
milaGGL Mar 29, 2024
6dba503
Quick fix for FirebaseServerApp#toJSON (#8109)
jamesdaniels Apr 2, 2024
527b16c
Upgrade dependencies April 2024 (#8098)
DellaBitta Apr 3, 2024
719c531
Update undici dependency to 5.8.24. (#8138)
DellaBitta Apr 8, 2024
532a441
Don't delete on update failure (#8141)
zwu52 Apr 8, 2024
39840fc
Use the latest published version for auth sample app (#8130)
Apr 9, 2024
3beb347
Fix internal assertion encountered when testing with jsdom. (#8142)
MarkDuckworth Apr 9, 2024
2b4dd0a
Conditionally run terraform CI steps only if secrets are available. (…
MarkDuckworth Apr 9, 2024
1d1cfc0
Fix terraform steps in CI PR #2 (#8147)
MarkDuckworth Apr 10, 2024
0949518
Bump @babel/traverse from 7.15.4 to 7.24.1 (#8140)
dependabot[bot] Apr 10, 2024
661d2d5
Bump browserify-sign from 4.2.1 to 4.2.3 in /e2e (#8136)
dependabot[bot] Apr 10, 2024
a3d5452
April Dependency Update Changeset (#8134)
DellaBitta Apr 10, 2024
1a18d19
Version Packages (#8143)
google-oss-bot Apr 11, 2024
35bb278
Bump browserify-sign from 4.2.1 to 4.2.3 (#8151)
dependabot[bot] Apr 11, 2024
9559427
Bump protobufjs from 6.11.3 to 7.2.6 (#8150)
dependabot[bot] Apr 11, 2024
052400d
Bump @babel/traverse from 7.14.7 to 7.24.1 in /e2e (#8152)
dependabot[bot] Apr 11, 2024
dc7815d
Bump protobufjs from 6.11.3 to 6.11.4 in /e2e (#7563)
dependabot[bot] Apr 11, 2024
09347ce
Bump semver from 5.7.1 to 5.7.2 in /packages/auth-compat/demo (#7444)
dependabot[bot] Apr 12, 2024
8f62f76
Update health-metrics-pull-request.yml (#8158)
DellaBitta Apr 12, 2024
ac503a2
Bump semver from 6.3.0 to 6.3.1 in /e2e (#7437)
dependabot[bot] Apr 14, 2024
a340264
Bump semver from 7.5.2 to 7.5.3 (#8164)
dependabot[bot] Apr 15, 2024
0d1d24a
Bump minimist from 1.2.5 to 1.2.8 in /packages/auth-compat/demo (#7062)
dependabot[bot] Apr 15, 2024
0453aef
Update deploy-config.yml (#8168)
DellaBitta Apr 15, 2024
6278c53
Bump minimist from 1.2.5 to 1.2.8 in /e2e (#7061)
dependabot[bot] Apr 15, 2024
d33f14c
Bump http-cache-semantics from 4.1.0 to 4.1.1 (#7004)
dependabot[bot] Apr 17, 2024
f7b04cc
Bump http-cache-semantics in /packages/auth-compat/demo (#7003)
dependabot[bot] Apr 17, 2024
05fd8f4
Bump jszip from 3.7.1 to 3.10.1 (#7001)
dependabot[bot] Apr 18, 2024
be99043
Bump json5 from 1.0.1 to 1.0.2 (#6933)
dependabot[bot] Apr 18, 2024
5a6c42f
Firestore: simple_db.ts: move getAndroidVersion() to a free function …
dconeybe Apr 18, 2024
12e658c
Firestore: Fix spurious "Backend didn't respond within 10 seconds" er…
dconeybe Apr 18, 2024
82bb518
Change Markdown links in code docs to JSDoc links (#8182)
dlarocque Apr 18, 2024
ce52fca
Bump ansi-regex from 5.0.0 to 5.0.1 in /e2e (#6257)
dependabot[bot] Apr 18, 2024
ffd2728
Bump ua-parser-js from 0.7.31 to 0.7.37 (#8179)
dependabot[bot] Apr 19, 2024
722c8b6
Bump shell-quote from 1.7.2 to 1.7.3 (#6381)
dependabot[bot] Apr 19, 2024
5a48714
Bump async from 3.2.0 to 3.2.4 in /e2e (#6447)
dependabot[bot] Apr 20, 2024
1bd5cce
Update recommended Node version for development (#8188)
dlarocque Apr 22, 2024
8c38131
Fix typo and link formatting in contribution guide (#8183)
dlarocque Apr 22, 2024
fd81dd2
Update bug_report_v2.yaml (#8199)
hsubox76 Apr 22, 2024
7971ad5
Emit a module package file into esm2017 auth webextension bundle (#8191)
dlarocque Apr 23, 2024
0472ae8
Go back using xmlhttprequest for bidi-streams (#8197)
wu-hui Apr 24, 2024
c307ae0
Version Packages (#8202)
google-oss-bot Apr 25, 2024
fce0f07
Use closure-net as a dependency of Firestore (#8190)
ehsannas May 1, 2024
848f772
fix: Update webchannel-wrapper to fix webchannel multi-byte character…
ehsannas May 2, 2024
256044e
[internal] Query/AggregateQuery to proto representation (#8177)
ehsannas May 2, 2024
613ac47
Add tslib bsd-0 license (#8224)
hsubox76 May 6, 2024
f0539c3
Update CODEOWNERS (#8230)
hsubox76 May 8, 2024
285738a
Add Vertex SDK (#8119)
hsubox76 May 8, 2024
db3c67a
Bump all packages (#8237)
hsubox76 May 9, 2024
54116fd
Version Packages (#8236)
google-oss-bot May 13, 2024
965a6e6
Fix minor mistakes in the root README (#8242)
dlarocque May 14, 2024
f7634ee
Fix multi tab persistence issue (#8247)
milaGGL May 14, 2024
cefae23
Fix setConsent to properly use the `update` gtag command (#8243)
DellaBitta May 15, 2024
9e042b3
Add job to create a GitHub release (#8248)
dlarocque May 16, 2024
756a7a7
Version Packages (#8254)
google-oss-bot May 20, 2024
7abae92
Fix typings issue (#8256)
hsubox76 May 21, 2024
e6ce832
More robust clean up after unexpected docgen process exits. (#8260)
hsubox76 May 22, 2024
f1e4732
Add toc (#8257)
dlarocque May 23, 2024
d3ce3d3
Generate dts rollups for auth webextension and cordova (#8251)
dlarocque May 23, 2024
8d79f53
Add vertex preview token to canary deploy workflow. (#8262)
hsubox76 May 23, 2024
66ef63e
[CI] Reduce executions by removing `on: push` for two workflows (#8266)
DellaBitta May 23, 2024
0625e35
Version Packages (#8264)
google-oss-bot May 27, 2024
a9e98fc
Upgrade babel dependencies (#8263)
dlarocque May 29, 2024
bfc6ef9
Convert supported mimetypes to be bullet points (#8270)
dlarocque May 30, 2024
11fdfda
Update social media platforms (#8277)
jsoref May 31, 2024
1ac1bf7
Remove dangling link to feature from toc (#8278)
jsoref May 31, 2024
2deb307
Add docgen all script and update documentation (#8258)
dlarocque Jun 4, 2024
7f2a2a8
Add tsec script to all packages (#8285)
dlarocque Jun 4, 2024
99c97bf
Remove VertexAIError related entries from TOC (#8300)
dlarocque Jun 5, 2024
8b9d2a1
VertexAI: add test cases for countTokens() (#8317)
tanzimfh Jun 18, 2024
f0ef341
VertexAI: migrate test cases to use updated set of golden files (#8324)
tanzimfh Jun 20, 2024
90999a8
remove some unused NPM token env variables (#8330)
hsubox76 Jun 21, 2024
9c18bf8
fix: Fix a typo in the webchannel-wrapper's package.json. (#8331)
ehsannas Jun 24, 2024
a0875c5
Add a new VertexAI error type (#8240)
dlarocque Jun 25, 2024
d703548
VertexAI: update testing to clone mock responses from shared repo (#8…
tanzimfh Jun 27, 2024
61fcec3
Fix multi-tab snapshot listener metadata sync issue (#8339)
milaGGL Jun 28, 2024
ca1e4dd
fix: browser detection (#8315)
JoseVSeb Jun 28, 2024
c759fc5
FirebaseServerAppImpl: guard use of FinalizationRegistry based on its…
DellaBitta Jun 28, 2024
42bfa94
Update the URL for the Metric Service (#8261)
yifanyang Jul 1, 2024
215f172
Fix FirebaseServerApp Typescript exactOptionalPropertyTypes error (#8…
DellaBitta Jul 1, 2024
0b70923
VertexAI: add test script to run unit tests without updating mock res…
tanzimfh Jul 2, 2024
cd39256
Fix typos in VertexAI errors docs (#8346)
dlarocque Jul 2, 2024
0205e0a
Version Packages (#8345)
google-oss-bot Jul 3, 2024
e2aa0e9
Upgrade setup-gcloud to v2 (#8286)
dlarocque Jul 10, 2024
e1c321d
Upgrade firebase-admin and google/cloud-firestore in rules-unit-testi…
dlarocque Jul 10, 2024
04fa109
Remove .git (#8362)
dlarocque Jul 10, 2024
5676813
VertexAI: add support for mock responses versioning system (#8361)
tanzimfh Jul 15, 2024
3600648
Use safevalues to fix trusted types issues reported by tsec (#8301)
dlarocque Jul 16, 2024
6d7dc17
Disable extraneous import errors on violating lines in auth tests (#8…
dlarocque Jul 16, 2024
0f96114
Spelling (#8280)
jsoref Jul 18, 2024
ec39c8f
Fix format of a changeset file
DellaBitta Jul 18, 2024
d03815f
Version Packages (#8369)
google-oss-bot Jul 19, 2024
13622ea
Implement SessionToken Persistence
tom-andersen Jul 24, 2024
c559e03
Pretty
tom-andersen Jul 24, 2024
10f27be
Implement SessionToken Persistence
tom-andersen Jul 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions packages/firestore/src/local/globals_cache.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/**
* @license
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import { ByteString } from '../util/byte_string';

import { PersistencePromise } from './persistence_promise';
import { PersistenceTransaction } from './persistence_transaction';

/**
* General purpose cache for global values.
*
* Global state that cuts across components should be saved here. Following are contained herein:
*
* `sessionToken` tracks server interaction across Listen and Write streams. This facilitates cache
* synchronization and invalidation.
*/
export interface GlobalsCache {
/**
* Gets session token.
*/
getSessionToken(
transaction: PersistenceTransaction
): PersistencePromise<ByteString>;

/**
* Sets session token.
*
* @param sessionToken - The new session token.
*/
setSessionToken(
transaction: PersistenceTransaction,
sessionToken: ByteString
): PersistencePromise<void>;
}
54 changes: 54 additions & 0 deletions packages/firestore/src/local/indexeddb_globals_cache.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/**
* @license
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ByteString } from '../util/byte_string';

import { GlobalsCache } from './globals_cache';
import { DbGlobals } from './indexeddb_schema';
import { DbGlobalsStore, DbGlobalsKey } from './indexeddb_sentinels';
import { getStore } from './indexeddb_transaction';
import { PersistencePromise } from './persistence_promise';
import { PersistenceTransaction } from './persistence_transaction';
import { SimpleDbStore } from './simple_db';

export class IndexedDbGlobalsCache implements GlobalsCache {
private globalsStore(
txn: PersistenceTransaction
): SimpleDbStore<DbGlobalsKey, DbGlobals> {
return getStore<DbGlobalsKey, DbGlobals>(txn, DbGlobalsStore);
}

getSessionToken(txn: PersistenceTransaction): PersistencePromise<ByteString> {
const globals = this.globalsStore(txn);
return globals.get('sessionToken').next(global => {
const value = global?.value;
return value
? ByteString.fromUint8Array(value)
: ByteString.EMPTY_BYTE_STRING;
});
}

setSessionToken(
txn: PersistenceTransaction,
sessionToken: ByteString
): PersistencePromise<void> {
const globals = this.globalsStore(txn);
return globals.put({
name: 'sessionToken',
value: sessionToken.toUint8Array()
});
}
}
12 changes: 12 additions & 0 deletions packages/firestore/src/local/indexeddb_persistence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ import { DocumentLike, WindowLike } from '../util/types';

import { BundleCache } from './bundle_cache';
import { DocumentOverlayCache } from './document_overlay_cache';
import { GlobalsCache } from './globals_cache';
import { IndexManager } from './index_manager';
import { IndexedDbBundleCache } from './indexeddb_bundle_cache';
import { IndexedDbDocumentOverlayCache } from './indexeddb_document_overlay_cache';
import { IndexedDbGlobalsCache } from './indexeddb_globals_cache';
import { IndexedDbIndexManager } from './indexeddb_index_manager';
import { IndexedDbLruDelegateImpl } from './indexeddb_lru_delegate_impl';
import { IndexedDbMutationQueue } from './indexeddb_mutation_queue';
Expand Down Expand Up @@ -188,6 +190,7 @@ export class IndexedDbPersistence implements Persistence {
/** A listener to notify on primary state changes. */
private primaryStateListener: PrimaryStateListener = _ => Promise.resolve();

private readonly globalsCache: IndexedDbGlobalsCache;
private readonly targetCache: IndexedDbTargetCache;
private readonly remoteDocumentCache: IndexedDbRemoteDocumentCache;
private readonly bundleCache: IndexedDbBundleCache;
Expand Down Expand Up @@ -232,6 +235,7 @@ export class IndexedDbPersistence implements Persistence {
this.schemaVersion,
new SchemaConverter(this.serializer)
);
this.globalsCache = new IndexedDbGlobalsCache();
this.targetCache = new IndexedDbTargetCache(
this.referenceDelegate,
this.serializer
Expand Down Expand Up @@ -708,6 +712,14 @@ export class IndexedDbPersistence implements Persistence {
return this._started;
}

getGlobalsCache(): GlobalsCache {
debugAssert(
this.started,
'Cannot initialize GlobalsCache before persistence is started.'
);
return this.globalsCache;
}

getMutationQueue(
user: User,
indexManager: IndexManager
Expand Down
12 changes: 11 additions & 1 deletion packages/firestore/src/local/indexeddb_schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ import { DbTimestampKey } from './indexeddb_sentinels';
* 16. Parse timestamp strings before creating index entries.
*/

export const SCHEMA_VERSION = 16;
export const SCHEMA_VERSION = 17;

/**
* Wrapper class to store timestamps (seconds and nanos) in IndexedDb objects.
Expand Down Expand Up @@ -536,3 +536,13 @@ export interface DbDocumentOverlay {
/** The overlay mutation. */
overlayMutation: ProtoWrite;
}

/**
* An object containing global name/value pair.
*/
export interface DbGlobals {
/** Name is a globally unique identifier for a value. */
name: string;
/** Value is a general purpose storage for global data. */
value: Uint8Array;
}
14 changes: 14 additions & 0 deletions packages/firestore/src/local/indexeddb_schema_converter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ import {
DbDocumentOverlayCollectionPathOverlayIndexPath,
DbDocumentOverlayKeyPath,
DbDocumentOverlayStore,
DbGlobalsKeyPath,
DbGlobalsStore,
DbIndexConfigurationCollectionGroupIndex,
DbIndexConfigurationCollectionGroupIndexPath,
DbIndexConfigurationKeyPath,
Expand Down Expand Up @@ -269,6 +271,12 @@ export class SchemaConverter implements SimpleDbSchemaConverter {
});
}

if (fromVersion < 17 && toVersion >= 17) {
p = p.next(() => {
createGlobalsStore(db);
});
}

return p;
}

Expand Down Expand Up @@ -748,6 +756,12 @@ function createDocumentOverlayStore(db: IDBDatabase): void {
);
}

function createGlobalsStore(db: IDBDatabase): void {
db.createObjectStore(DbGlobalsStore, {
keyPath: DbGlobalsKeyPath
});
}

function extractKey(remoteDoc: DbRemoteDocumentLegacy): DocumentKey {
if (remoteDoc.document) {
return new DocumentKey(
Expand Down
14 changes: 13 additions & 1 deletion packages/firestore/src/local/indexeddb_sentinels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ export const DbTargetDocumentDocumentTargetsKeyPath = ['path', 'targetId'];
* The type to represent the single allowed key for the DbTargetGlobal store.
*/
export type DbTargetGlobalKey = typeof DbTargetGlobalKey;

/**
* The key string used for the single object that exists in the
* DbTargetGlobal store.
Expand Down Expand Up @@ -371,6 +372,14 @@ export const DbDocumentOverlayCollectionGroupOverlayIndexPath = [
'largestBatchId'
];

/** Name of the IndexedDb object store. */
export const DbGlobalsStore = 'globals';

export const DbGlobalsKeyPath = 'name';

/** Names of global values */
export type DbGlobalsKey = 'sessionToken';

// Visible for testing
export const V1_STORES = [
DbMutationQueueStore,
Expand Down Expand Up @@ -415,6 +424,7 @@ export const V15_STORES = [
DbIndexEntryStore
];
export const V16_STORES = V15_STORES;
export const V17_STORES = [...V15_STORES, DbGlobalsStore];

/**
* The list of all default IndexedDB stores used throughout the SDK. This is
Expand All @@ -425,7 +435,9 @@ export const ALL_STORES = V12_STORES;

/** Returns the object stores for the provided schema. */
export function getObjectStores(schemaVersion: number): string[] {
if (schemaVersion === 16) {
if (schemaVersion === 17) {
return V17_STORES;
} else if (schemaVersion === 16) {
return V16_STORES;
} else if (schemaVersion === 15) {
return V15_STORES;
Expand Down
39 changes: 39 additions & 0 deletions packages/firestore/src/local/memory_globals_cache.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* @license
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ByteString } from '../util/byte_string';

import { GlobalsCache } from './globals_cache';
import { PersistencePromise } from './persistence_promise';
import { PersistenceTransaction } from './persistence_transaction';

export class MemoryGlobalsCache implements GlobalsCache {
private sessionToken: ByteString = ByteString.EMPTY_BYTE_STRING;

getSessionToken(
transaction: PersistenceTransaction
): PersistencePromise<ByteString> {
return PersistencePromise.resolve(this.sessionToken);
}

setSessionToken(
transaction: PersistenceTransaction,
sessionToken: ByteString
): PersistencePromise<void> {
this.sessionToken = sessionToken;
return PersistencePromise.resolve();
}
}
8 changes: 8 additions & 0 deletions packages/firestore/src/local/memory_persistence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { ObjectMap } from '../util/obj_map';

import { DocumentOverlayCache } from './document_overlay_cache';
import { encodeResourcePath } from './encoded_resource_path';
import { GlobalsCache } from './globals_cache';
import { IndexManager } from './index_manager';
import { LocalSerializer } from './local_serializer';
import {
Expand All @@ -40,6 +41,7 @@ import {
import { newLruGarbageCollector } from './lru_garbage_collector_impl';
import { MemoryBundleCache } from './memory_bundle_cache';
import { MemoryDocumentOverlayCache } from './memory_document_overlay_cache';
import { MemoryGlobalsCache } from './memory_globals_cache';
import { MemoryIndexManager } from './memory_index_manager';
import { MemoryMutationQueue } from './memory_mutation_queue';
import {
Expand Down Expand Up @@ -71,6 +73,7 @@ export class MemoryPersistence implements Persistence {
* persisting values.
*/
private readonly indexManager: MemoryIndexManager;
private readonly globalsCache: MemoryGlobalsCache;
private mutationQueues: { [user: string]: MemoryMutationQueue } = {};
private overlays: { [user: string]: MemoryDocumentOverlayCache } = {};
private readonly remoteDocumentCache: MemoryRemoteDocumentCache;
Expand All @@ -94,6 +97,7 @@ export class MemoryPersistence implements Persistence {
serializer: JsonProtoSerializer
) {
this._started = true;
this.globalsCache = new MemoryGlobalsCache();
this.referenceDelegate = referenceDelegateFactory(this);
this.targetCache = new MemoryTargetCache(this);
const sizer = (doc: Document): number =>
Expand Down Expand Up @@ -150,6 +154,10 @@ export class MemoryPersistence implements Persistence {
return queue;
}

getGlobalsCache(): GlobalsCache {
return this.globalsCache;
}

getTargetCache(): MemoryTargetCache {
return this.targetCache;
}
Expand Down
6 changes: 6 additions & 0 deletions packages/firestore/src/local/persistence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { DocumentKey } from '../model/document_key';

import { BundleCache } from './bundle_cache';
import { DocumentOverlayCache } from './document_overlay_cache';
import { GlobalsCache } from './globals_cache';
import { IndexManager } from './index_manager';
import { MutationQueue } from './mutation_queue';
import { PersistencePromise } from './persistence_promise';
Expand Down Expand Up @@ -167,6 +168,11 @@ export interface Persistence {
*/
setNetworkEnabled(networkEnabled: boolean): void;

/**
* Returns GlobalCache representing a general purpose cache for global values.
*/
getGlobalsCache(): GlobalsCache;

/**
* Returns a MutationQueue representing the persisted mutations for the
* given user.
Expand Down
Loading
Loading