René's URL Explorer Experiment


Title: fix(app-check)!: skip App Check during server rendering by default by armando-navarro · Pull Request #3773 · angular/angularfire · GitHub

Open Graph Title: fix(app-check)!: skip App Check during server rendering by default by armando-navarro · Pull Request #3773 · angular/angularfire

X Title: fix(app-check)!: skip App Check during server rendering by default by armando-navarro · Pull Request #3773 · angular/angularfire

Description: Fixes #3488 Fixes #3128 Refs #3089 Following docs/app-check.md in a server-rendered app fails the build with ReferenceError: document is not defined. provideAppCheck runs the app's setup function during server rendering, and the reCAPTCHA providers need a browser. This PR skips App Check during server rendering by default, with an opt-in for apps that run it there on purpose. ImportantThis is a breaking change, so it needs to merge before 21.0.0 is tagged. Breaking change During server rendering, AngularFire no longer calls the function passed to provideAppCheck, and inject(AppCheck) returns null there. The browser is unchanged. Apps that run App Check on the server on purpose, with a server-capable provider such as a CustomProvider backed by the Admin SDK, keep the old behavior with one line in their server config: { provide: APP_CHECK_ON_SERVER, useValue: true } Firebase's documented route for App Check in server renders passes a client-generated token to initializeServerApp as appCheckToken. It needs no App Check instance on the server, so this change does not affect it. Changes appCheckInstanceFactory returns early during server rendering unless APP_CHECK_ON_SERVER is true, and in development mode it warns once that it skipped App Check. APP_CHECK_ON_SERVER is a new export from @angular/fire/app-check, false by default. defaultAppCheckInstanceFactory drops skipped entries before choosing the default instance. ɵgetDefaultInstanceOf reads .app on every entry, so an app calling provideAppCheck twice would otherwise crash on the server. New specs in src/app-check/app-check.spec.ts cover the server default, two provideAppCheck calls on the server, the opt-in, and the browser. The docs change follows in a separate PR. Verification On an Angular 21.2 app rendered at build time, using the setup from docs/app-check.md: 21.0.0-rc.1: ng build fails with ReferenceError: document is not defined. This branch: the build succeeds, and AppCheck is null on the server. This branch with APP_CHECK_ON_SERVER and the reCAPTCHA provider: the original error returns, so the opt-in does run App Check on the server. This branch with APP_CHECK_ON_SERVER and a CustomProvider on the server: the build succeeds with a real AppCheck on the server. The warning prints in a development build and not in a production build. npm run test:chrome-headless: 111 passed, 48 skipped. npm run test:node: 331 specs, 0 failures. Each new spec fails when the code it covers is disabled: the server skip, the filter, or the opt-in.

Open Graph Description: Fixes #3488 Fixes #3128 Refs #3089 Following docs/app-check.md in a server-rendered app fails the build with ReferenceError: document is not defined. provideAppCheck runs the app's setup functi...

X Description: Fixes #3488 Fixes #3128 Refs #3089 Following docs/app-check.md in a server-rendered app fails the build with ReferenceError: document is not defined. provideAppCheck runs the app's setup fu...

Opengraph URL: https://github.com/angular/angularfire/pull/3773

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3

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/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:1a0f3882-ad16-596a-dce3-7446d3e750b8
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA680:31B648:20889B:2B8FB2:6B03C743
html-safe-nonce08ed24e96035ba8184c2ddd0cbf96c7914ef21d600143e9b48a8fd95105c3ca3
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNjgwOjMxQjY0ODoyMDg4OUI6MkI4RkIyOjZCMDNDNzQzIiwidmlzaXRvcl9pZCI6IjY1NjIyODU5MDIwNjI5Mjk3MzIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac53a11cf63370e3b48948390da77563938513883caa853b47bcc2f969a14047e0
hovercard-subject-tagpull_request:4642958213
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/angular/angularfire/pull/3773/files
twitter:imagehttps://avatars.githubusercontent.com/u/13904589?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/13904589?s=400&v=4
og:image:altFixes #3488 Fixes #3128 Refs #3089 Following docs/app-check.md in a server-rendered app fails the build with ReferenceError: document is not defined. provideAppCheck runs the app's setup functi...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
diff-viewunified
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 full-width
disable-turbotrue
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

Links:

Skip to contenthttps://github.com/angular/angularfire/pull/3773/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangularfire%2Fpull%2F3773%2Ffiles
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%2Fpull%2F3773%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=angular%2Fangularfire
Reloadhttps://github.com/angular/angularfire/pull/3773/files
Reloadhttps://github.com/angular/angularfire/pull/3773/files
Reloadhttps://github.com/angular/angularfire/pull/3773/files
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
Sign up for GitHub https://github.com/signup?return_to=%2Fangular%2Fangularfire%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fangular%2Fangularfire%2Fissues%2Fnew%2Fchoose
armando-navarrohttps://github.com/armando-navarro
angular:mainhttps://github.com/angular/angularfire/tree/main
armando-navarro:a43-app-check-server-skiphttps://github.com/armando-navarro/angularfire/tree/a43-app-check-server-skip
Conversation 2 https://github.com/angular/angularfire/pull/3773
Commits 2 https://github.com/angular/angularfire/pull/3773/commits
Checks 24 https://github.com/angular/angularfire/pull/3773/checks
Files changed https://github.com/angular/angularfire/pull/3773/files
Please reload this pagehttps://github.com/angular/angularfire/pull/3773/files
fix(app-check)!: skip App Check during server rendering by default https://github.com/angular/angularfire/pull/3773/files#top
Show all changes 2 commits https://github.com/angular/angularfire/pull/3773/files
6deeefd fix(app-check)!: skip App Check during server rendering by default armando-navarro Sep 25, 2026 https://github.com/angular/angularfire/pull/3773/commits/6deeefd8101a6f14f3a265aebcbfd77aafe8a34a
70038a9 Merge branch 'main' into a43-app-check-server-skip armando-navarro Sep 27, 2026 https://github.com/angular/angularfire/pull/3773/commits/70038a9bc0f5bbfdfecb2594400fde0928c281b8
Clear filters https://github.com/angular/angularfire/pull/3773/files
Please reload this pagehttps://github.com/angular/angularfire/pull/3773/files
Please reload this pagehttps://github.com/angular/angularfire/pull/3773/files
app-check.module.ts https://github.com/angular/angularfire/pull/3773/files#diff-a5f187a280bf2332af92cb764a9b817c1590db098c464246abe523029105e1ed
app-check.spec.ts https://github.com/angular/angularfire/pull/3773/files#diff-4bf71922e363cf1c41679843e711f61518e0062e23cc20f4610474dcd3ef0589
public_api.ts https://github.com/angular/angularfire/pull/3773/files#diff-7c7da5e685c63e8e03af7b2827c18b91a86c30a56e5257e85e1c2321a4921c54
src/app-check/app-check.module.tshttps://github.com/angular/angularfire/pull/3773/files#diff-a5f187a280bf2332af92cb764a9b817c1590db098c464246abe523029105e1ed
View file https://github.com/armando-navarro/angularfire/blob/70038a9bc0f5bbfdfecb2594400fde0928c281b8/src/app-check/app-check.module.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angularfire/pull/3773/{{ revealButtonHref }}
https://github.com/angular/angularfire/pull/3773/files#diff-a5f187a280bf2332af92cb764a9b817c1590db098c464246abe523029105e1ed
https://github.com/angular/angularfire/pull/3773/files#diff-a5f187a280bf2332af92cb764a9b817c1590db098c464246abe523029105e1ed
src/app-check/app-check.spec.tshttps://github.com/angular/angularfire/pull/3773/files#diff-4bf71922e363cf1c41679843e711f61518e0062e23cc20f4610474dcd3ef0589
View file https://github.com/armando-navarro/angularfire/blob/70038a9bc0f5bbfdfecb2594400fde0928c281b8/src/app-check/app-check.spec.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angularfire/pull/3773/{{ revealButtonHref }}
https://github.com/angular/angularfire/pull/3773/files#diff-4bf71922e363cf1c41679843e711f61518e0062e23cc20f4610474dcd3ef0589
https://github.com/angular/angularfire/pull/3773/files#diff-4bf71922e363cf1c41679843e711f61518e0062e23cc20f4610474dcd3ef0589
src/app-check/public_api.tshttps://github.com/angular/angularfire/pull/3773/files#diff-7c7da5e685c63e8e03af7b2827c18b91a86c30a56e5257e85e1c2321a4921c54
View file https://github.com/armando-navarro/angularfire/blob/70038a9bc0f5bbfdfecb2594400fde0928c281b8/src/app-check/public_api.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angularfire/pull/3773/{{ revealButtonHref }}
Please reload this pagehttps://github.com/angular/angularfire/pull/3773/files
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-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.