Skip to content

· 15 min read · Nadeera Silva

Mobile

Google Play Delete Account URL for Flutter Firebase Apps

What Google Play's delete account URL must do, where it goes in the Data safety form, and a tested Firebase web page that deletes accounts.

A hand holding an Android phone with a blurred teal button beside a laptop showing a blurred web form, and a paper tag in a teal dish on a sunlit marble sill, standing for deleting an account from the web.

If your app lets people create an account, Google Play wants a delete account URL: a web page, entered in the Data safety form in Play Console, where users can ask you to delete their account and data without opening the app. A link to your home page, a generic privacy policy or a page that only works inside the app gets the form flagged and can block updates. Here is what Google's account deletion requirement asks for, where the URL goes, and a small Firebase Hosting page plus Cloud Function that I tested today in the Firebase emulators.

Quick answer

If your app allows account creation, Google Play requires two deletion paths: one inside the app, and a web page where users can request deletion of their account and its data without reinstalling the app. Put that page's link in the Data deletion questions of the Data safety form (Play Console, App content page). The page must load, name your app or developer as shown on Google Play, make the deletion option easy to find, and say what you delete and what you keep and why.

What this means for your app or business

  • Your release can be blocked. Google's help page says that if there are issues with your Data deletion answers, new submissions and app updates are rejected in Play Console. A bug fix can sit waiting behind a form problem.
  • "Email us" is allowed, a dead link is not. Google accepts a link, a support email or a form, as long as it works and clearly covers deletion.
  • Time and cost (my estimate). About half a day to a day for a typical Firebase app using the code below. Longer if user data lives in many places or with third-party services.
  • When to get help. If you don't know every place your app stores user data, or you are in a regulated field such as health or finance, get a developer (and legal advice on retention) before you submit.

What is Google Play's app account deletion requirement?

The User Data policy has an "Account Deletion Requirement". It says users "must have a readily discoverable option to initiate app account deletion from within your app and outside of your app (for example, by visiting your website)", and that "a link to this web resource must be entered in the designated URL form field within Play Console."

Three more rules matter for the build:

  • Deleting the account means deleting the data tied to it. Temporary deactivation, disabling or "freezing" does not count.
  • You may keep some data for security, fraud prevention or regulatory compliance, but you must tell users what you keep (for example in your privacy policy).
  • If service providers process the data, delete it from your servers and ask the provider to do the same.

Google also lets you offer partial deletion. Its April 2023 announcement says users who don't want to delete their whole account "can choose to delete other data only where applicable (such as activity history, images, or videos)."

The deadlines are long past: 7 December 2023 for the Data deletion questions, with extensions to 31 May 2024. For what changed more recently, see my October 2026 Google Play policy update post.

What must the delete account web page say?

Google's help page lists the requirements for the web link and resource. Here they are next to what my sample page does.

RequirementWhat Google saysHow the sample page meets it
WorksThe link must be functional and load without errorStatic page on Firebase Hosting
Easy to findDeletion is prominently featured on the pageThe page is only about deletion
Names the appReferences the app or developer name as on Google PlayTitle and first line name both
Lets users request itA link, support email or form that starts deletionEmail link sign-in, then a delete button
No reinstallMust not send users back to the appRuns fully in the browser
Extra steps explainedSteps such as cancelling a subscription are outlinedSubscription note on the page
Retention disclosedSay what you keep for security, fraud or legal reasons"What we keep" section with a period
Partial deletionOptional, show if you delete other data too"Delete my activity history only"

Why does Google flag a delete account URL?

Each of these maps to a line in Google's policy or help page:

  • The link is broken or outdated. The policy's list of don'ts includes "broken or outdated links to the external deletion resource page."
  • It points to a generic page. A home page or a long privacy policy with deletion buried in the middle isn't "prominently featured." If you use your privacy policy, Google wants the deletion section highlighted, for example with an anchor link.
  • It doesn't name the app. The page must reference the app or developer name as it appears on your store listing.
  • It only works in the app. Instructions like "go to Profile in the app" fail the no-reinstall rule.
  • It deactivates instead of deleting. Freezing an account is not deletion, and the form answers must match what you actually do.

Where do I add the delete account URL in the Data safety form?

  1. Open Play Console, select the app and go to the App content page.
  2. Open Data safety and work through the form. In "Data collection and security", answer whether users can request that their data is deleted.
  3. Answer the Data deletion questions. If your app supports account creation, disclose that it provides account deletion and paste your web page URL into the URL field (developers usually call it the "Delete account URL"; Google's help text calls it the designated URL form field).
  4. Check the store listing preview, then submit. Back on App content, a green check mark next to Data safety means your submission is compliant.

The Data safety form is also required for apps on closed and open testing tracks, not just production. If you are a new personal developer working through the 12 testers for 14 days rule, sort this out before your closed test.

Diagram of the Google Play delete account URL flow: Play Console App content, Data safety, Data deletion questions and the URL, then the web page, email link sign-in, choice of full or partial deletion, a callable Cloud Function that deletes Firestore, Storage and the Auth user, and a confirmation
The delete account URL flow I tested in the Firebase emulators on 26 November 2026

How do I build a delete account page for a Flutter Firebase app?

The page lives on Firebase Hosting, so you don't need a separate website. Users prove they own the account with a Firebase email sign-in link, then a callable Cloud Function deletes their data. Phone-number accounts get an email fallback.

Step 1: Enable email link sign-in and authorize the domain

In the Firebase console, enable the Email/Password provider and its Email link (passwordless sign-in) option. The Firebase docs say the domain in your redirect URL must be in the Authentication Authorized domains list, so check that your Hosting domain (for example your-project.web.app) or custom domain is there.

Step 2: Write the page

Replace "Acme Notes" and "Acme Labs" with the names on your store listing, and write retention periods that are true for your app.

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Delete your Acme Notes account | Acme Labs</title>
</head>
<body>
  <main>
    <h1>Delete your Acme Notes account</h1>
    <p>Acme Notes is published on Google Play by Acme Labs. You can delete your account here
       without installing the app.</p>

    <h2>How to delete your account</h2>
    <ol>
      <li>Enter the email address you use in Acme Notes and press <b>Send link</b>.</li>
      <li>Open the link we email you on this device.</li>
      <li>Choose <b>Delete my account</b> or <b>Delete my activity history only</b>.</li>
    </ol>

    <form id="email-form">
      <label for="email">Email</label>
      <input id="email" type="email" required autocomplete="email">
      <button type="submit">Send link</button>
    </form>

    <section id="actions" hidden>
      <button id="delete-account">Delete my account</button>
      <button id="delete-history">Delete my activity history only</button>
    </section>
    <p id="status" role="status"></p>

    <h2>What we delete</h2>
    <ul>
      <li>Your login (email address and user ID)</li>
      <li>Your profile, notes and activity history</li>
      <li>Photos and files you uploaded</li>
    </ul>

    <h2>What we keep, and for how long</h2>
    <ul>
      <li>A record that a deletion was done (a one-way hash of your user ID and the date),
          kept for 12 months so we can answer questions about the request.</li>
      <li>Purchase records held by Google Play. Cancel any subscription in the Play Store first;
          deleting your account does not cancel it.</li>
    </ul>

    <p>Signed up with a phone number, or can't receive the email? Write to
       <a href="mailto:privacy@acmelabs.example?subject=Delete%20my%20Acme%20Notes%20account">privacy@acmelabs.example</a>
       from any address and we will verify you and finish the deletion within 7 days.</p>
  </main>
  <script type="module" src="page.js"></script>
</body>
</html>

Step 3: Sign the user in with an email link

This module uses the official CDN build of the Firebase JS SDK 13.4.0, so there is no bundler. It saves the email in localStorage as the Firebase docs recommend, and asks for it again if the link is opened on another device.

// public/delete-account/delete.js
import { initializeApp } from 'https://www.gstatic.com/firebasejs/13.4.0/firebase-app.js';
import {
  getAuth, sendSignInLinkToEmail, isSignInWithEmailLink, signInWithEmailLink,
} from 'https://www.gstatic.com/firebasejs/13.4.0/firebase-auth.js';
import { getFunctions, httpsCallable } from 'https://www.gstatic.com/firebasejs/13.4.0/firebase-functions.js';

// Paste the web app config from Project settings > Your apps.
export const app = initializeApp({
  apiKey: 'YOUR_WEB_API_KEY',
  authDomain: 'your-project.firebaseapp.com',
  projectId: 'your-project',
  appId: 'YOUR_WEB_APP_ID',
});
export const auth = getAuth(app);
export const functions = getFunctions(app); // same region as the function (default us-central1)

export async function sendLink(email, pageUrl) {
  await sendSignInLinkToEmail(auth, email, { url: pageUrl, handleCodeInApp: true });
}

export async function finishSignIn(email, href) {
  if (!isSignInWithEmailLink(auth, href)) return null;
  const cred = await signInWithEmailLink(auth, email, href);
  return cred.user;
}

export async function deleteData(scope) {
  const call = httpsCallable(functions, 'requestDataDeletion');
  const res = await call({ scope }); // 'account' or 'history'
  if (scope === 'account') await auth.signOut();
  return res.data;
}
// public/delete-account/page.js
import { sendLink, finishSignIn, deleteData } from './delete.js';

const $ = (id) => document.getElementById(id);
const status = (msg) => { $('status').textContent = msg; };
const pageUrl = location.origin + location.pathname;

$('email-form').addEventListener('submit', async (e) => {
  e.preventDefault();
  const email = $('email').value.trim();
  localStorage.setItem('deleteEmail', email);
  try {
    await sendLink(email, pageUrl);
    status('Check your inbox and open the link on this device.');
  } catch (err) {
    status('Could not send the link. Email us instead (address below).');
  }
});

if (location.href.includes('oobCode=')) {
  // Opened on another device? Ask again so the link can't be used by someone else.
  const email = localStorage.getItem('deleteEmail') ?? prompt('Confirm your email address');
  try {
    const user = await finishSignIn(email, location.href);
    if (user) {
      history.replaceState(null, '', pageUrl); // drop the one-time code from the URL
      $('email-form').hidden = true;
      $('actions').hidden = false;
      status(`Signed in as ${user.email}. Choose what to delete.`);
    }
  } catch (err) {
    status('This link has expired. Request a new one.');
  }
}

for (const [id, scope] of [['delete-account', 'account'], ['delete-history', 'history']]) {
  $(id).addEventListener('click', async () => {
    const ok = confirm(scope === 'account'
      ? 'Delete your account and all its data? This cannot be undone.'
      : 'Delete your activity history? Your account stays.');
    if (!ok) return;
    try {
      await deleteData(scope);
      localStorage.removeItem('deleteEmail');
      status(scope === 'account' ? 'Your account and data are deleted.' : 'Your activity history is deleted.');
      $('actions').hidden = true;
    } catch (err) {
      status('Something went wrong. Email us and we will finish it by hand.');
    }
  });
}

Step 4: Delete the data in a callable Cloud Function

The function only accepts a signed-in caller whose sign-in is under five minutes old, and only the scopes account or history. For a full deletion it removes the Firestore user document with all subcollections, the user's Storage folder and then the Auth user. It keeps one log entry with a SHA-256 hash of the uid, which matches what the page tells users.

// functions/src/index.ts
import { initializeApp } from 'firebase-admin/app';
import { getAuth } from 'firebase-admin/auth';
import { getFirestore, FieldValue } from 'firebase-admin/firestore';
import { getStorage } from 'firebase-admin/storage';
import { onCall, HttpsError } from 'firebase-functions/v2/https';
import { createHash } from 'node:crypto';

initializeApp();

type Scope = 'account' | 'history';

export const requestDataDeletion = onCall(async (request) => {
  const auth = request.auth;
  if (!auth) throw new HttpsError('unauthenticated', 'Sign in first.');

  // The web page signs the user in right before this call.
  const age = Math.floor(Date.now() / 1000) - auth.token.auth_time;
  if (age > 5 * 60) throw new HttpsError('failed-precondition', 'requires-recent-login');

  const scope = (request.data as { scope?: unknown } | null)?.scope;
  if (scope !== 'account' && scope !== 'history') {
    throw new HttpsError('invalid-argument', 'scope must be "account" or "history".');
  }

  const uid = auth.uid;
  const db = getFirestore();
  const userRef = db.collection('users').doc(uid);

  if (scope === 'history') {
    // Partial deletion: activity only, the account stays.
    await db.recursiveDelete(userRef.collection('history'));
  } else {
    await db.recursiveDelete(userRef); // profile doc + all subcollections
    await getStorage().bucket().deleteFiles({ prefix: `users/${uid}/` });
    await getAuth().deleteUser(uid);
  }

  // The only thing we keep: a hashed uid and a timestamp, as proof the request was done.
  const uidHash = createHash('sha256').update(uid).digest('hex');
  await db.collection('deletionLog').add({
    uidHash,
    scope: scope satisfies Scope,
    completedAt: FieldValue.serverTimestamp(),
  });

  return { done: true, scope };
});

Step 5: Deploy

{
  "hosting": { "public": "public" },
  "functions": [{ "source": "functions" }]
}
(cd functions && npx tsc -p .)
firebase deploy --only hosting,functions

Your delete account URL is then https://your-project.web.app/delete-account/ (or the same path on your custom domain).

What about the in-app deletion path?

Google still requires the in-app option, and it should be easy to find, for example in account settings. In Flutter you can call the same function from a Settings row, so web and app share one deletion path. Reauthenticate the user first; I covered that, plus Sign in with Apple token revocation, in my Guideline 5.1.1(v) account deletion post.

import 'package:cloud_functions/cloud_functions.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart';

/// Settings row: the in-app path Google asks for.
class DeleteAccountTile extends StatelessWidget {
  const DeleteAccountTile({super.key});

  @override
  Widget build(BuildContext context) {
    return ListTile(
      leading: const Icon(Icons.delete_forever_outlined),
      title: const Text('Delete account'),
      subtitle: const Text('Removes your account and data'),
      onTap: () => _confirmAndDelete(context),
    );
  }

  Future<void> _confirmAndDelete(BuildContext context) async {
    final ok = await showDialog<bool>(
      context: context,
      builder: (c) => AlertDialog(
        title: const Text('Delete your account?'),
        content: const Text('Your profile, notes and files are deleted. This cannot be undone.'),
        actions: [
          TextButton(onPressed: () => Navigator.pop(c, false), child: const Text('Cancel')),
          TextButton(onPressed: () => Navigator.pop(c, true), child: const Text('Delete')),
        ],
      ),
    );
    if (ok != true) return;
    // Reauthenticate first (see the Apple 5.1.1(v) post), then reuse the web page's function.
    await FirebaseFunctions.instance
        .httpsCallable('requestDataDeletion')
        .call({'scope': 'account'});
    await FirebaseAuth.instance.signOut();
  }
}

How do I verify the fix?

  • Emulator test. I ran the page's own delete.js against the Auth, Firestore, Storage, Functions and Hosting emulators with firebase emulators:exec. All 14 checks passed: the page is served with both names, calls without sign-in get unauthenticated, unknown scopes get invalid-argument, the email link signs in to the existing account, history-only deletion keeps the profile and Auth user, and full deletion removes Firestore data, Storage files and the Auth user. The log holds only the hashed uid.
  • Real-device check. In a private window with no app installed, request a link, delete a test account, and confirm in the Firebase console that the user and their documents are gone.
  • Play Console. After you submit the Data safety form, look for the green check mark on the App content page.

How do I prevent this from coming back?

  • Keep the deletion page on a domain you control and will renew; a broken link is a policy issue.
  • Use the exact app name from your store listing on the page, and update it if you rename the app.
  • Every time you add a collection, bucket path or third-party service that stores user data, add it to the function.
  • Keep "what we keep, and for how long" accurate, and match it in your privacy policy.
  • Test the page in a private window before each major release.

Frequently asked questions

What is the Google Play delete account URL?

It is the link to a web page where users can request deletion of their app account and its data without using the app. If your app allows account creation, Google Play requires you to enter it in the Data deletion questions of the Data safety form.

Where do I add the delete account URL in the Data safety form?

In Play Console, open your app, go to the App content page and open Data safety. In the Data deletion questions, say that your app supports account creation and deletion and paste the web page URL into the URL field, then submit.

Is an in-app delete button enough for Google Play?

No. Google requires both an in-app path and a web resource, because some users have already uninstalled the app. The web page must let them request deletion without reinstalling the app.

Can my delete account URL just be my privacy policy?

Only if the deletion section is prominent, for example reached through an anchor link, names your app or developer, and tells users how to request deletion. A general privacy policy with deletion buried in it risks being flagged.

Can I use an email address instead of a web form?

Yes. Google says the pathway can be a link that starts deletion, a customer service email or a form, as long as the page works, is clearly about deletion and names your app or developer.

Can I keep some data after a user deletes their account?

Yes, for legitimate reasons such as security, fraud prevention or regulatory compliance. You must tell users what you keep, for example on the deletion page and in your privacy policy.

What happens if my account deletion answers have issues?

Google's help page says new submissions and app updates are rejected in Play Console while the Data deletion answers have issues. Non-compliant apps can also face further enforcement, including removal from Google Play.

Do apps without sign-up need a delete account URL?

The account deletion requirement applies to apps that let users create an account. All apps still answer the Data deletion questions, and permanently private apps, enterprise device management apps and offline-only accounts are exempt from the requirement.

Sources

  1. Understanding Google Play's app account deletion requirements (Google Play Console Help)
  2. User Data policy (Account Deletion Requirement) (Google Play Console Help)
  3. Provide information for Google Play's Data safety section (Google Play Console Help)
  4. Giving Users More Transparency and Control Over Account Data (Android Developers Blog, 2023-04-05)
  5. Authenticate with Firebase using Email Link in JavaScript (Firebase, 2026-11-20)
  6. Call functions from your app (callable functions) (Firebase, 2026-11-19)
  7. Manage users with the Admin SDK (Firebase, 2026-11-18)
  8. Delete data from Cloud Firestore (Firebase, 2026-11-18)
  9. firebase (JavaScript SDK) on npm (npm)
  10. firebase-functions on npm (npm)
  11. firebase-admin on npm (npm)
SharePost on XLinkedIn

Comments

Share a question or note about this article.

Loading comments…