code: function onLinkWithGenericIdPCredential() {
    var providerId = $('#link-generic-idp-provider-id').val();
    var idToken = $('#link-generic-idp-id-token').val();
    var accessToken = $('#link-generic-idp-access-token').val();
    var provider = new firebase.auth.OAuthProvider(providerId);
    activeUser().linkWithCredential(
        provider.credential(idToken, accessToken))
        .then(onAuthUserCredentialSuccess, onAuthError);
  }
docs: Links with a generic IdP credential.