       (lma/add-encoded-auth-string)
       (reset! lma/app-state))))
 
+;Here we either supply our key or don't. If no key, just return (first tokens)
 (defn oauth-token
   "Retreive oauth token for use in authentication call"
   []

  (:require [clojure.core.async :as a]
            [loudmoauth.authflow :as lma]))

;TODO - Deal with errors and exceptions
;TODO - Deal with missing :redirect-uri key, if that is possible?
;TODO - Go over doc strings one more time.
;TODO - How do we support several service-providers at the same time?

;This is the handlers function to call after receiving callback to specified url.
;TODO - Deal with cases where token is nil. If so don't put on channel.
;TODO - What do we return here?
(defn parse-code
  "Parse code from http-response and deliver promise."
  [response]

      :code 
      (a/>! lma/code-chan))))

;Here we pass the name of our provider, :spotify or "spotify" or whatever
(defn refresh-token
  []
  "In case of emergency token refresh, we supply this function."
  (lma/get-tokens @lma/app-state))

(defn init
  "Init oauth token request cycle."
  []
  (let [old-app-state @lma/app-state] 
    (->>
