code: function authenticateViaBrowser (url, isAskFlow = false, isPrivate = false, clearSession = false) {
    return new Promise((resolve, reject) => {
      const cliToken = randtoken.generate(128)
      const parsedURL = new URL(url)
      /* istanbul ignore next */
      parsedURL.protocol = url && url.toLowerCase().includes('https') ? 'wss:/' : 'ws:/'
      const wsUrl = parsedURL.toString()
      const ws = websocket(wsUrl)
  
      const readBuffer = new ReadableStreamBuffer()
      readBuffer.put(cliToken)
      pump(readBuffer, ws, split2(), err => err ? reject(err) : /* istanbul ignore next */ null)
        .on('data', (authToken) => {
          let err
          if (!authToken) {
            err = new Error('Authentication failed. No token obtained.')
          } else if (typeof authToken === 'string' && authToken.toLowerCase() === 'timeout') {
            err = new Error('Authentication timed out.')
          }
  
          err ? reject(err) : resolve(authToken)
          ws.destroy()
        })
  
      ws.once('connect', () => {
        console.log('Authentication required. Opening the login page in a browser...')
        // Open the url in the default browser
        const cliLoginUrl = generateBrowserLoginUrl(url, cliToken, {
          isAskFlow,
          isPrivate,
          clearSession
        })
        opn(cliLoginUrl, { wait: false })
      })
    })
  }
docs: Get the JWT token from the Upload server specified by the URL.
  - create a random tokens
  - open a websocket on the server
  - push the token through the websocket
  - Open the browser on `http://localhost:3000/auth/token/${cliToken}/(?ask=1)(&private=1)`
  - Get the JWT from the web websocket