--- tokenauth.module	2009-07-16 20:31:37.000000000 -0700
+++ tokenauth.module	2010-03-01 11:26:40.000000000 -0800
@@ -265,3 +265,14 @@ function tokenauth_user($op, &$edit, &$a
       db_query($sql, $account->uid);
   }
 }
+
+/**
+ * Implementation of hook_url_outbound_alter().
+ * Appends the current user's token to any path run through url()
+ * that passes tokenauth's allows pages filter.
+ */
+function tokenauth_url_outbound_alter(&$path, &$options, $original_path) {
+  if ($_REQUEST['token'] && tokenauth_allowed_pages($original_path)) {
+    $options['query'] = 'token=' . tokenauth_get_token();
+  }
+}
