Demo, all content is generated
Question

Rejected for 5.1.1(v), they want account deletion inside the app?

Solved · 613 views · asked by tariq_builds · edited

Got past the design rejection, now this:

Guideline 5.1.1(v) - Data Collection and Storage. The app supports account creation but does not include an option to initiate account deletion.

We use Firebase Auth with email/password. I have a "contact us to delete your account" line in the privacy policy. Apparently that's not enough? What exactly do they want, a button?

What I’ve tried

Added a mailto link in settings saying "email us to delete your account". Rejected again with the same guideline.

Comment
Which sign-in methods do you have? Only email/password or also Google/Apple? sven_fire · edited
email/password and google tariq_builds · edited

3 answers

Marked as helpful by the asker
sven_fire · edited

Yes, a button, in the app, that actually deletes the account (or starts the deletion, if you need a short grace period). A mailto link doesn't count because the user can't complete it in the app.

With Firebase the minimum is:

import { getAuth, deleteUser } from "firebase/auth";
import { doc, deleteDoc, getFirestore } from "firebase/firestore";

async function deleteAccount() {
  const user = getAuth().currentUser!;
  await deleteDoc(doc(getFirestore(), "users", user.uid)); // your own data first
  await deleteUser(user);
}

Two gotchas:

  1. deleteUser throws auth/requires-recent-login if the user signed in a while ago. Catch it, ask for the password again (reauthenticateWithCredential), then retry.
  2. Delete the user's data, not just the auth record. Better to do that in a Cloud Function triggered by user deletion so you also catch subcollections and Storage files.

In the review notes, say "Settings → Account → Delete account".

Comment
requires-recent-login is exactly what I hit when testing, would have been rejected a third time. thanks tariq_builds · edited
wes_codes · edited

And if you have Sign in with Apple, Apple also expects you to revoke the Apple token on deletion. Easy to miss.

Comment
amir_h · edited

One more practical thing: if you keep any data for legal reasons (invoices, for example), that's allowed, but say so on the deletion screen ("we keep invoices for 7 years as required by law"). Reviewers do read that screen.

Comment