listUsers method
Retrieves a list of users (single batch only) with a size of maxResults
starting from the offset as specified by pageToken
. This is used to
retrieve all the users of a specified project in batches.
See https://firebase.google.com/docs/auth/admin/manage-users#list_all_users for code samples and detailed documentation.
- maxResults - The page size, 1000 if undefined. This is also the maximum allowed limit.
- pageToken - The next page token. If not specified, returns users starting without any offset.
Returns a promise that resolves with the current batch of downloaded users and the next page token.
Implementation
Future<ListUsersResult> listUsers({
int? maxResults,
String? pageToken,
}) async {
final response = await _authRequestHandler.downloadAccount(
maxResults: maxResults,
pageToken: pageToken,
);
final users =
response.users?.map(UserRecord.fromResponse).toList() ?? <UserRecord>[];
return ListUsersResult._(
users: users,
pageToken: response.nextPageToken,
);
}