Task<Void> synchronizeAllAuthDataAsync(){
  Map<String,Map<String,String>> authData;
synchronized (mutex) {
    if (!isCurrentUser()) {
      return Task.forResult(null);
    }
    authData=getAuthData();
  }
  List<Task<Void>> tasks=new ArrayList<>(authData.size());
  for (  String authType : authData.keySet()) {
    tasks.add(synchronizeAuthDataAsync(authType));
  }
  return Task.whenAll(tasks);
}

Task < Void > synchronizeAllAuthDataAsync ( ) { Map < String , Map < String , String > > authData ; synchronized ( mutex ) { if ( ! isCurrentUser ( ) ) { return Task . forResult ( null ) ; } authData = getAuthData ( ) ; } List < Task < Void > > tasks = new ArrayList < > ( authData . size ( ) ) ; for ( String authType : authData . keySet ( ) ) { tasks . add ( synchronizeAuthDataAsync ( authType ) ) ; } return Task . whenAll ( tasks ) ; }
ensures that all auth sources have auth data ( e . g . access tokens , etc . ) that matches this user .
