Reputation: 303
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.
Upvotes: 3
Views: 553
Reputation: 317487
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.
Upvotes: 4