Memberstack now supports self-service account deletion for your members. This feature allows members to delete their own accounts without requiring admin intervention, while automatically handling subscription cancellations.
How It Works
When a member deletes their account:
- The member is immediately logged out
- Their account is permanently deleted from Memberstack
- Any active recurring subscriptions are automatically cancelled
- Their Stripe customer profile remains intact (not deleted)
Implementation Options
There are two ways to implement the account deletion feature:
1. Custom Implementation with Data Attributes
For sites with custom member dashboards, you can implement the delete functionality using our new data attribute:
data-ms-action="delete-account"
This attribute can be added to any clickable element (like buttons or links) and will trigger the account deletion process when clicked.
Note: Unlike the prebuilt modal, the data attribute approach does not automatically show a confirmation dialog. You'll need to implement your own confirmation process as described below.
Recommended: Two-Step Confirmation Process
Here's a button you can copy and paste directly into your Webflow project.
To prevent accidental deletions, we strongly recommend implementing your own two-step confirmation process:
- Create an initial "Delete Account" button without the data attribute:
<button id="show-delete-modal">Delete Account</button>
- When clicked, display your own custom confirmation modal with the actual delete button that includes the data attribute:
<div id="delete-confirmation-modal" style="display: none;"> <h3>Are you sure you want to delete your account?</h3> <p>This action cannot be undone. All your data will be permanently deleted.</p> <button data-ms-action="delete-account">Yes, Delete My Account</button> <button id="cancel-delete">Cancel</button> </div>
This approach adds an extra layer of confirmation before the irreversible deletion process is triggered, significantly reducing the risk of accidental deletions.
2. Using the Prebuilt Profile Modal
The simplest implementation is to use Memberstack's prebuilt profile modal, which now includes a "Delete Account" option:
Important: The delete account button is disabled by default for all sites. To enable it:
- Go to your Memberstack dashboard
- Navigate to App Settings > Security
- Find the "Allow Members to Delete Their Accounts" toggle
- Switch the toggle to "Enabled"
The delete button will then appear in the prebuilt profile modal under the Security tab for all logged-in members.
Prebuilt Modal Confirmation Dialog
When using the prebuilt profile modal, Memberstack automatically displays a confirmation dialog before completing the deletion:
This built-in confirmation dialog clearly warns members that:
- The action cannot be undone
- They will be logged out
- Their account will be deleted
Best Practices
Security Considerations
Consider these security best practices:
- Place the delete option in a secure area of your member dashboard
- Consider implementing additional verification for high-value accounts
- Maintain proper backups of your member data
FAQ
Q: Will deleting an account remove the member's Stripe customer profile?
A: No, the Stripe customer profile remains intact. Only the Memberstack account is deleted.
Q: Can deleted accounts be recovered?
A: No, account deletion is permanent and cannot be undone.
Q: Are subscriptions automatically cancelled?
A: Yes, any recurring subscriptions associated with the account are automatically cancelled in Stripe.
Q: Can I customize the confirmation dialog?
A: Currently, the confirmation dialog is not customizable in the pre-built modal but you can implement your own.
Comments
2 comments
Hi,
thanks that is a beneficial application.
Is this also working in the test mode? Because for me it is not working
Thanks for your help.
Best,
Georg
And in the button to copy, you use "delete-member" instead of "delete-account"
Please sign in to leave a comment.