       xhr.json url:stateUrl, (err, state) ->
         xhr url:textUrl, (err, text) ->
           callback { text, state }
+
 setTimeout (-> auth()), 1000

clientSecret = 'c8d6ab58bbf8095c82c0f11e57db92bf2b9f76be'
redirect = window.location.href

auth = () ->
  query = parseQuery window.location.search
  if query.code
    xhr
      url: 'https://github.com/login/oauth/access_token'
      data:


  else
    rnd = ('0123456789abcdef'[Math.random() * 16 | 0] for x in [0..10]).join ''
    window.localStorage.setItem 'x-orig-state', rnd
    #iframeEl = document.createElement 'iframe'
    #extend iframeEl.style,
    #  position: 'absolute'
