docs: @SuppressWarnings("deprecation")
    public Credential createAndStoreCredential(TokenResponse response, String userId)
        throws IOException {
      Credential credential = newCredential(userId).setFromTokenResponse(response);
      if (credentialStore != null) {
        credentialStore.store(userId, credential);
      }
      if (credentialDataStore != null) {
        credentialDataStore.set(userId, new StoredCredential(credential));
      }
      if (credentialCreatedListener != null) {
        credentialCreatedListener.onCredentialCreated(credential, response);
      }
      return credential;
    }