Custom sign-up flow - Deleting users?

Hey all,

My app uses the Custom Sign-Up Flow library from the docs:

With some additional customizations like more fields from the user on sign-up. However I recently submitted my app to the App Store and had it rejected because there is no way for users to delete their accounts if they choose.

What is the best way to delete a user account in the app, after it was created using the Custom Sign-Up Flow library? Simply search for the user in the Users Data Table and delete the entire row?

Yes. Along with any other data they may own, which may be in other tables.

If you suspect that users may delete their account by accident, and need it restored, then you might simply “mark” the row(s) for deletion, and physically delete it/them after a reasonable period.

1 Like

I normally have a “manage account” page, with options to suspend and delete user accounts.

With suspend it gives them 7-30 days cooling off, and then auto deletes their account and any linked data on the last day. Generally I let them log in, but have a suspension page which just gives them an option to unsuspend. (Just put a suspended bool in your users table).

With delete I give them an are you sure?, and an option to download whatever is theirs, then delete any rows in any tables which are theirs, then log them out, then delete their user row.

2 Likes

Would this best be added as a function in the dependency?

From a design and implementation standpoint, I suspect not. The Custom Sign-Up Flow library has a well-defined limit to its responsibility, and that’s probably a good thing.

Removing users can require such varied logic, from app to app, it’s not clear how any one add-in library could do a good job of it.

However, if you find yourself repeating the same logic from app to app, then you might want to factor that out as your own private dependency.

1 Like

Would probably make it a bit messy, tbh. I might just publish a pattern for it for the community.

1 Like