Created
December 9, 2017 01:13
-
-
Save hiranya911/1b8366005e5c8fc8bfb10659cd7047df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Start listing users from the beginning, 1000 at a time. | |
ListUsersPage page = FirebaseAuth.getInstance().listUsersAsync(null).get(); | |
while (page != null) { | |
for (ExportedUserRecord user : page.getValues()) { | |
System.out.println("User: " + user.getUid()); | |
} | |
page = page.getNextPage(); | |
} | |
// Iterate through all users. This will still retrieve users in batches, | |
// buffering no more than 1000 users in memory at a time. | |
page = FirebaseAuth.getInstance().listUsersAsync(null).get(); | |
for (ExportedUserRecord user : page.iterateAll()) { | |
System.out.println("User: " + user.getUid()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment