Version 5.0.0 problems - Solid-Auth-Client - Not working in Chrome

Hi,

I run the 5.0.0 version of solid and everything seem to be working fine except the following 2 issues.

  1. When i login with my POD, it is not taking me to the POD page (URI). It still stays in the welcome page and just the login button changed to logout. It also not displaying the login ID. I have to manually enter the URL eg - https://podname.solid.com. This problem exist in all the browsers.

  2. When i manually enter the POD URL after i logged in, the POD shows the Login button again even though i am able to see the private folder and create files in the inbox of that particular POD. When i click the login button, solid-auth-client pop up is shows and when i try to login as the pod user (it shows the username of the POD) nothing happens. Its just idle. This problem exists only in Chrome browser. When i tried with Safari and Firefox, it works. When i investigated this problem a bit more, i found out that chrome is throwing - Cross Origin Read Blocking (CORB) problem.

Have anyone came across these issues? It will be great if you could address one of these 2 problems.

Maybe try 5.0.1?

I fixed the problem number 1 by entering the following script in the index.html file. But the problem 2 still exists. Its giving trouble only in google chrome.

To solve problem 1, copy paste the following code into your index.html file of the main page.

<script>
  const elements = {};
  ['loggedIn', 'profileLink'].forEach(id => {
    elements[id] = document.getElementById(id)
  })

  async function login () {
    const session = await solid.auth.popupLogin()
    if (session) {
      // Make authenticated request to the server to establish a session cookie
      const {status} = await solid.auth.fetch(location)
      if (status === 401) {
        alert(`Invalid login.`)
        await solid.auth.logout()
      }
    }
  }

  solid.auth.trackSession(async session => {
    if (!session) {
      elements.loggedIn.classList.add('hidden')
    }
    else {
      elements.loggedIn.classList.remove('hidden')
      elements.profileLink.innerText = session.webId
      elements.profileLink.href = session.webId
    }
  })
</script>
1 Like