We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55bef70 commit 2a0e272Copy full SHA for 2a0e272
delete-unused-accounts-cron/functions/index.js
@@ -69,7 +69,7 @@ async function getInactiveUsers(users = [], nextPageToken) {
69
const result = await admin.auth().listUsers(1000, nextPageToken);
70
// Find users that have not signed in in the last 30 days.
71
const inactiveUsers = result.users.filter(
72
- user => Date.parse(user.metadata.lastSignInTime) < (Date.now() - 30 * 24 * 60 * 60 * 1000));
+ user => Date.parse(user.metadata.lastRefreshTime || user.metadata.lastSignInTime) < (Date.now() - 30 * 24 * 60 * 60 * 1000));
73
74
// Concat with list of previously found inactive users if there was more than 1000 users.
75
users = users.concat(inactiveUsers);
0 commit comments