                       :never (t/years 1000))
                     (t/plus (t/now))
                     (c/to-long))
-        mac (hmac hmac-secret (str nonce group-id expiry))]
+        mac (hmac (config :hmac-secret) (str nonce group-id expiry))]
     (str (config :site-url) "/invite?group-id=" group-id "&nonce=" nonce
          "&expiry=" expiry "&mac=" mac)))
 

(defn reset-page
  [user token]
  (let [now (.getTime (java.util.Date.))
        form-hmac (hmac hmac-secret (str now token (user :id)))
        api-domain (config :api-domain)]
    (clostache/render-resource "templates/reset_page.html.mustache"
                               {:api_domain api-domain

  [params]
  (constant-comp
    (params :hmac)
    (hmac (config :hmac-secret)
          (str (params :now) (params :token) (params :invite_id) (params :email)))))

(def avatar-size [128 128])
