I like to automatically delete the user authentication and user info in the database if they have not logged in for say,a month or a year. This is to prevent inactive accounts from taking up space in Firebase.
Is there any way to do that.
You will need two things:
#1 might require some code in your app to write the current time every time the user launches the app.
#2 requires that you use use the Firebase Admin SDK to delete user accounts that you discover using a query for data that you created in #1.
If you do not have data from #1, you will have to list all user accounts using the admin SDK, then figure out which ones need to be deleted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With