boxClient.authenticateFromSecureStorage(authSecureStorage);
} else {
LOG.debug("Using OAuth {}", cachedBoxClient);
// authorize App for user, and create OAuth token with refresh token
final IAuthFlowUI authFlowUI = new LoginAuthFlowUI(configuration, boxClient);
final CountDownLatch latch = new CountDownLatch(1);
final LoginAuthFlowListener listener = new LoginAuthFlowListener(latch);
boxClient.authenticate(authFlowUI, true, listener);
// wait for login to finish or timeout