code: static OAuth2Credentials createOAuth2Credentials(SessionConfiguration config) throws IOException {
  
  
          return new OAuth2Credentials.Builder()
                  .setCredentialDataStoreFactory(MemoryDataStoreFactory.getDefaultInstance())
                  .setRedirectUri(config.getRedirectUri())
                  .setScopes(config.getScopes())
                  .setClientSecrets(config.getClientId(), config.getClientSecret())
                  .build();
      }
docs: Creates an {@link OAuth2Credentials} object that can be used by any of the servlets.
  
  Throws an {@throws IOException} when no client ID or secret found in secrets.properties