All notes

    By Israr Kundi · Published 2026-11-25

    Firebase App Check 21 January 2027: fix your AI app

    Firebase App Check 21 January 2027: fix your AI app

    Your AI features stopped on 2 November. Here is why

    If your app's AI features stopped working on 2 November 2026, Firebase App Check is almost certainly the reason. Firebase started enforcing App Check for Firebase AI Logic that day, and Firebase App Check 21 January 2027 is the last date enforcement can be held off — after that, requests from app versions without App Check are blocked.

    The problem, in your words

    Your app worked fine. Then one morning the AI part just stopped — users tap the button and nothing comes back. Check the logs for this line:

    403 PERMISSION_DENIED: To access this model, you must enforce Firebase App Check. Learn more: https://firebase.google.com/docs/ai-logic/app-check

    That error is for a model that is commonly abused. A second version appears when Firebase has deactivated AI Logic in your project.

    Nothing changed in your code — Firebase broke it, not you.

    This only affects apps calling Gemini through Firebase AI Logic. If your app uses it and your users' version was built without App Check, its AI calls are now blocked, unless you set a delay before 2 November.

    Why it happened

    Firebase made the change to protect the Gemini API from abuse. From 2 November 2026, it automatically enforces App Check for Firebase AI Logic in every project that had not already turned it on or delayed it. Every request now needs a valid App Check token, proving it comes from your real app. Without a valid token, the request is unverified and gets blocked.

    Your released app never had App Check built in, so it cannot send one. If you see that 403, the missing App Check token is the cause — not a bug in your code.

    Firebase announced the delay option on 27 October 2026. That is why 21 January 2027 matters: on that date Firebase re-enforces App Check automatically, and it cannot be unenforced after that.

    Firebase App Check 21 January 2027: the minimum fix

    1. Check what your project says right now

    In the Firebase console, open Security > App Check > APIs and find the Firebase AI Logic row. It tells you whether App Check is enforced and when enforcement happens — the right next step depends on it.

    2. Buy time, if you need it — but know it is only borrowed

    Two ways to hold enforcement off — both end on 21 January 2027.

    - If you set a delay before 2 November, keep moving the Enforces date on the Firebase AI Logic row, up to 21 January 2027. Once a date you picked is reached, the picker disappears. - If you did not set a delay, temporarily unenforce instead: click the Firebase AI Logic row, click Set up, set Baseline protection to Unenforced (monitoring only), then pick a Replay protection setting and continue to the confirmation screen. This is also only possible until 21 January 2027.

    A delay is not a fix — it only buys time to ship a version with App Check built in. Reach 21 January 2027 without one and Firebase re-enforces App Check, and you cannot turn it off again.

    3. Add a real attestation provider to your app

    This is the actual fix — add a production attestation provider, then ship a new version with it:

    - Apple: DeviceCheck, App Attest, or reCAPTCHA Enterprise. - Android: Play Integrity or reCAPTCHA Enterprise. - Web: reCAPTCHA Enterprise. - Flutter: supports all of the providers above.

    For local development, use the debug provider. Never put a debug token in live code — it is for your own machine only.

    4. Enforce App Check — and check replay protection

    Once your new version is out, go back to Security > App Check > APIs and set Baseline protection to Enforced on the Firebase AI Logic row. Set Replay protection to Disabled unless you use limited-use tokens. If replay protection is on without them, the 403 stays even after App Check is working — check it first if the error stays.

    5. Get your users onto the new version

    Old versions on users' phones cannot be fixed from the console — their AI calls stay blocked until those users update. Ship the fixed version, tell users to update, and check unverified requests before you enforce.

    What NOT to do

    Do not paste a debug token into live code to make the error go away — it leaves your app open.

    Do not try to fix this by hiding or rotating a Gemini API key. Firebase AI Logic authorises the Gemini Developer API with a Google-managed service account, not a key in your app.

    Do not leave the app unenforced and forget about it — 21 January 2027 is a hard date, and enforcement comes back on its own.

    When to get help instead of fixing it yourself

    Get help if you are unsure which attestation provider your app needs, or if users are stuck on old versions. Get help too if the 403 stays after App Check is on — usually replay protection or a provider setup problem. The fix is straightforward, but order matters: provider first, new version out, then enforce.

    If this is your app, contact me through https://israr-kundi.web.app

    Free · 15 minutes

    Stuck on a half-built app?

    Send me the app link or a short description. In a free 15-minute rescue audit, I'll tell you the most likely launch blockers and the practical next step.

    Request a free rescue audit