René's URL Explorer Experiment


Title: One call to build the right Firebase app for server rendering · Issue #3843 · angular/angularfire · GitHub

Open Graph Title: One call to build the right Firebase app for server rendering · Issue #3843 · angular/angularfire

X Title: One call to build the right Firebase app for server rendering · Issue #3843 · angular/angularfire

Description: The server-side rendering section of the Authentication guide asks every server-rendered app to write the same 15-line provideFirebaseApp callback: check the platform, read REQUEST_CONTEXT through a cast, fall back to initializeApp when ...

Open Graph Description: The server-side rendering section of the Authentication guide asks every server-rendered app to write the same 15-line provideFirebaseApp callback: check the platform, read REQUEST_CONTEXT through ...

X Description: The server-side rendering section of the Authentication guide asks every server-rendered app to write the same 15-line provideFirebaseApp callback: check the platform, read REQUEST_CONTEXT through ...

Opengraph URL: https://github.com/angular/angularfire/issues/3843

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"One call to build the right Firebase app for server rendering","articleBody":"\nThe [server-side rendering section](https://github.com/angular/angularfire/blob/main/docs/auth.md#server-side-rendering) of the Authentication guide asks every server-rendered app to write the same 15-line `provideFirebaseApp` callback: check the platform, read `REQUEST_CONTEXT` through a cast, fall back to `initializeApp` when there is no token, and pass `releaseOnDeref` to `initializeServerApp`. The guide then lists five details that make it work, and missing any one of them renders the page signed out with no error.\n\nTwo more problems sit in that callback as written:\n\n- A `__session` cookie that Firebase cannot parse makes `initializeServerApp` throw from inside the provider factory, and the request fails with HTTP 500. The cookie only has to be set by something else under that name on the same domain.\n- App Check is never carried to the server. With App Check enforcement on for Firestore, every server render's reads are rejected, and the guide does not say so.\n\n### Proposal\n\nA new function in `@angular/fire/app`, called inside `provideFirebaseApp` once, in the configuration both platforms share:\n\n```ts\nprovideFirebaseApp(() => initializeBrowserOrServerApp(firebaseConfig)),\n```\n\n- In the browser it returns `initializeApp(firebaseConfig)`.\n- On the server it reads `authIdToken` and `appCheckToken` from the request context handed to `handle()` in `server.ts` (an app can pass either explicitly instead) and returns a `FirebaseServerApp` when either is present, or the ordinary app when neither is.\n- The server app is released when the render has been garbage collected, as `releaseOnDeref` does today, so a repeat request from the same visitor reuses it. A `releaseAfterRender` setting opts into a release at render end or a fixed time after it.\n- A token Firebase cannot parse renders the page signed out with one console warning instead of an HTTP 500.\n- In development mode, a request that arrives with no request context is noted once, since that is what a `server.ts` that forgot `handle()`'s second argument looks like.\n\nThe guide's five details would become three: keep exactly one `provideFirebaseApp`, pass `inject(FirebaseApp)` to every product provider, and never call `deleteApp` on the injected app. The guide should also gain a section on relaying the App Check token through the same cookie.\n\nExisting callbacks would keep working. This would not be a breaking change.\n\n","author":{"url":"https://github.com/armando-navarro","@type":"Person","name":"armando-navarro"},"datePublished":"2026-11-10T22:06:32Z","url":"https://github.com/angular/angularfire/issues/3843"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:ba29777d-551f-abdf-f1a2-7a90b3ef0fed
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD770:A950:30E3ECE:407F6F6:6B035C2E
html-safe-nonce508cd5d906fc5cb1f8c9b318e4e1a83145a579be5474bf21a82c30cc5cd61c47
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENzcwOkE5NTA6MzBFM0VDRTo0MDdGNkY2OjZCMDM1QzJFIiwidmlzaXRvcl9pZCI6IjgyMjYzOTMzMDYxMzgxMDY5MjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacc3e2f63e544849a917f830c0aee65c602d0eb13a054ac97a1febd5f4546c789b
hovercard-subject-tagissue:6316835097
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angularfire/3843/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ed31690e86d97c4b0dad6140f32d234fbf70967a72e61b2848b069d5b7663cb0/angular/angularfire/issues/3843
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ed31690e86d97c4b0dad6140f32d234fbf70967a72e61b2848b069d5b7663cb0/angular/angularfire/issues/3843
og:image:altThe server-side rendering section of the Authentication guide asks every server-rendered app to write the same 15-line provideFirebaseApp callback: check the platform, read REQUEST_CONTEXT through ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamearmando-navarro
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
go-importgithub.com/angular/angularfire git https://github.com/angular/angularfire.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id49453413
octolytics-dimension-repository_nwoangular/angularfire
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id49453413
octolytics-dimension-repository_network_root_nwoangular/angularfire
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/angular/angularfire/issues/3843#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangularfire%2Fissues%2F3843
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangularfire%2Fissues%2F3843
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=angular%2Fangularfire
Reloadhttps://github.com/angular/angularfire/issues/3843
Reloadhttps://github.com/angular/angularfire/issues/3843
Reloadhttps://github.com/angular/angularfire/issues/3843
angularhttps://github.com/angular
angularfirehttps://github.com/angular/angularfire
Codehttps://github.com/angular/angularfire
Issues162 (162)https://github.com/angular/angularfire/issues
Pull requests5 (5)https://github.com/angular/angularfire/pulls
Discussionshttps://github.com/angular/angularfire/discussions
Actionshttps://github.com/angular/angularfire/actions
Projectshttps://github.com/angular/angularfire/projects
Security and qualityhttps://github.com/angular/angularfire/security
Insightshttps://github.com/angular/angularfire/insights
https://github.com/angular/angularfire
New issuehttps://github.com/login?return_to=https://github.com/angular/angularfire/issues/3843
New issuehttps://github.com/login?return_to=https://github.com/angular/angularfire/issues/3843
#3844https://github.com/angular/angularfire/pull/3844
One call to build the right Firebase app for server renderinghttps://github.com/angular/angularfire/issues/3843#top
#3844https://github.com/angular/angularfire/pull/3844
comp: app-checkApp Check (src/app-check).https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22comp%3A%20app-check%22
comp: authAuthentication (src/auth).https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22comp%3A%20auth%22
comp: coreFirebaseApp DI core (src/app).https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22comp%3A%20core%22
comp: ssrServer-side rendering, hydration, @angular/ssr interop.https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22comp%3A%20ssr%22
type: featureNew capability or enhancement.https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22type%3A%20feature%22
22.0.0-rc.1https://github.com/angular/angularfire/milestone/35
https://github.com/armando-navarro
armando-navarrohttps://github.com/armando-navarro
on Nov 10, 2026https://github.com/angular/angularfire/issues/3843#issue-6316835097
server-side rendering sectionhttps://github.com/angular/angularfire/blob/main/docs/auth.md#server-side-rendering
armando-navarrohttps://github.com/armando-navarro
comp: app-checkApp Check (src/app-check).https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22comp%3A%20app-check%22
comp: authAuthentication (src/auth).https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22comp%3A%20auth%22
comp: coreFirebaseApp DI core (src/app).https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22comp%3A%20core%22
comp: ssrServer-side rendering, hydration, @angular/ssr interop.https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22comp%3A%20ssr%22
type: featureNew capability or enhancement.https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22type%3A%20feature%22
on Nov 10, 2026https://github.com/angular/angularfire/issues/3843#event-35735141554
armando-navarrohttps://github.com/armando-navarro
22.0.0-rc.1https://github.com/angular/angularfire/milestone/35
on Nov 10, 2026https://github.com/angular/angularfire/issues/3843#event-35735153685
armando-navarrohttps://github.com/armando-navarro
on Nov 11, 2026https://github.com/angular/angularfire/issues/3843#event-35748869215
docs(auth): describe the sample as an example of the one-call server apphttps://github.com/armando-navarro/angularfire/commit/bbc2beaca466ccf9c501f7b4a04bb626fcd68d5d
bbc2beahttps://github.com/armando-navarro/angularfire/commit/bbc2beaca466ccf9c501f7b4a04bb626fcd68d5d
armando-navarrohttps://github.com/armando-navarro
completedhttps://github.com/angular/angularfire/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
74abd5ahttps://github.com/angular/angularfire/commit/74abd5a5d147948874366f8a7351481cd038d827
on Nov 11, 2026https://github.com/angular/angularfire/issues/3843#event-35853936463
armando-navarrohttps://github.com/armando-navarro
on Nov 11, 2026https://github.com/angular/angularfire/issues/3843#event-35854223005
feat(app): add initializeBrowserOrServerApp for browser & server apps (…https://github.com/armando-navarro/angularfire/commit/74abd5a5d147948874366f8a7351481cd038d827
…https://github.com/angular/angularfire/pull/3844
https://docs.github.com/articles/closing-issues-via-commit-messages
74abd5ahttps://github.com/armando-navarro/angularfire/commit/74abd5a5d147948874366f8a7351481cd038d827
docs: document the 22.0.0-rc.1 changes (#3835)https://github.com/angular/angularfire/commit/ba0721848232d59ed9268347bbe5fbea34484a0e
#3835https://github.com/angular/angularfire/pull/3835
https://docs.github.com/articles/closing-issues-via-commit-messages
ba07218https://github.com/angular/angularfire/commit/ba0721848232d59ed9268347bbe5fbea34484a0e
feat(app): add initializeBrowserOrServerApp for browser & server apps (…https://github.com/armando-navarro/angularfire/commit/bb4df8c57a519e2ffd029a02c99253128b6e7ac2
…https://github.com/angular/angularfire/pull/3844
https://docs.github.com/articles/closing-issues-via-commit-messages
bb4df8chttps://github.com/armando-navarro/angularfire/commit/bb4df8c57a519e2ffd029a02c99253128b6e7ac2
feat(app): add initializeBrowserOrServerApp for browser & server apps (…https://github.com/angular/angularfire/commit/bda58d59a4426f04d0a80fe5f74a4923011238cb
…https://github.com/angular/angularfire/pull/3844
https://docs.github.com/articles/closing-issues-via-commit-messages
bda58d5https://github.com/angular/angularfire/commit/bda58d59a4426f04d0a80fe5f74a4923011238cb
docs: cover zone fixes, the server app helper and compat setup (#3835)https://github.com/angular/angularfire/commit/f4d5c2c6486afcec822a1e6fa7100687c97c89a9
#3835https://github.com/angular/angularfire/pull/3835
https://docs.github.com/articles/closing-issues-via-commit-messages
f4d5c2chttps://github.com/angular/angularfire/commit/f4d5c2c6486afcec822a1e6fa7100687c97c89a9
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angularfire/issues/3843
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angularfire/issues/3843
comp: app-checkApp Check (src/app-check).https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22comp%3A%20app-check%22
comp: authAuthentication (src/auth).https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22comp%3A%20auth%22
comp: coreFirebaseApp DI core (src/app).https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22comp%3A%20core%22
comp: ssrServer-side rendering, hydration, @angular/ssr interop.https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22comp%3A%20ssr%22
type: featureNew capability or enhancement.https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22type%3A%20feature%22
22.0.0-rc.1https://github.com/angular/angularfire/milestone/35
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.