/**
 * auth.js
 */

;(() => {
  window.jsAuth = {
    init() {
      document.addEventListener('registrationCompleted', (evt) => {
        const pin = evt.detail.clientId
        if (!pin) return

        console.log('userInfoUpdated')
      })

      document.addEventListener('userInfoUpdated', (evt) => {
        if (evt.detail.clientId !== evt.detail.prevClientId) {
          console.log('userInfoUpdated')
        }
      })
    }
  }
})()
