Merged
Conversation
🦋 Changeset detectedLatest commit: 1e50af6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
jamesdaniels
commented
Mar 10, 2025
jamesdaniels
commented
Mar 10, 2025
jamesdaniels
commented
Mar 10, 2025
DellaBitta
reviewed
Mar 10, 2025
packages/auth/src/platform_browser/persistence/cookie_storage.ts
Outdated
Show resolved
Hide resolved
packages/auth/src/platform_browser/persistence/cookie_storage.ts
Outdated
Show resolved
Hide resolved
packages/auth/src/platform_browser/persistence/cookie_storage.ts
Outdated
Show resolved
Hide resolved
jamesdaniels
commented
Mar 10, 2025
hsubox76
reviewed
Mar 12, 2025
packages/auth/src/platform_browser/persistence/cookie_storage.ts
Outdated
Show resolved
Hide resolved
hsubox76
reviewed
Mar 12, 2025
jamesdaniels
commented
Mar 13, 2025
| "@rollup/plugin-strip": "2.1.0", | ||
| "@types/express": "4.17.21", | ||
| "chromedriver": "119.0.1", | ||
| "cookie-store": "4.0.0-next.4", |
Member
Author
There was a problem hiding this comment.
FYI using this dev-dep for types, somewhere else I tried this ponyfill and found it unsuitable for prod as it can't be webpacked.
jamesdaniels
commented
Mar 25, 2025
sam-gc
reviewed
Mar 25, 2025
packages/auth/src/platform_browser/persistence/cookie_storage.ts
Outdated
Show resolved
Hide resolved
jamesdaniels
commented
Mar 25, 2025
This comment was marked as resolved.
This comment was marked as resolved.
Collaborator
Size Report 1Affected Products
Test Logs |
Collaborator
Size Analysis Report 1This report is too large (139,584 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.Test Logs |
Member
Author
|
@sam-gc @DellaBitta @hsubox76 PTAL at the latest iteration, cleaned up a lot. I'll be adding comments, fixing the test I broke with the function rename, and addressing my last few TODOs in the next change-set. |
DellaBitta
requested changes
Mar 26, 2025
jamesdaniels
commented
Mar 27, 2025
| // persistenceMananger to be available. see _getFinalTarget for more context | ||
| this._persistenceManagerAvailable = new Promise<void>( | ||
| resolve => (this._resolvePersistenceManagerAvailable = resolve) | ||
| ); |
Member
Author
There was a problem hiding this comment.
Can i haz Promise.withResolvers yet? 🤣
egilmorez
approved these changes
Mar 27, 2025
packages/auth/src/platform_browser/persistence/cookie_storage.ts
Outdated
Show resolved
Hide resolved
hsubox76
approved these changes
Mar 27, 2025
DellaBitta
approved these changes
Mar 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
go/firebase-auth-cookie-persistence, pair with this NextJS middleware.
Demo here—login restricted to
@google.comGoogle accounts.go/firebase-cookie-auth-bug-bash for bug bash instructions / feedback.
Principles of operation:
COOKIE/__cookie__, which is handled by the NextJS middleware. The middleware this redacts the refreshToken and stores it in an HTTP-only cookie, the idToken is stored in an JS-readable cookiegetCurrentUser()internally can accept an idToken and will initiated a fetch request to get the user-details""and will make a best-effort attempt to hit/__cookie__, the middleware treats the blank string as a logout and will delete the refreshToken cookie if seenThere's a lot to clean up here, some high level things that need to be addressed