Error 400 when switching Solid App on the same domain (but different paths)

I have two (actually several) Solid Apps deployed on the same domain but different paths. This is a result of deploying multiple github pages under my account.

After using one App, I visited another one. Then, I was automatically directed to some errors on my Pod’s site (instead of the App’s):

Error reading file: Error: Web error: 400 (Bad Request) on GET of <https://SOLID-SERVER/.oidc/auth?client_id=HIDDEN&redirect_uri=https%3A%2F%2Fme.ryey.icu%2Fknoodle%3Fstate%3D15f244ce57274c918d56d977c8f4cbd7&response_type=code&scope=openid+offline_access+webid&code_challenge=HIDDEN&code_challenge_method=S256&prompt=none&response_mode=query>

(some parts replaced with HIDDEN in case sensitive.)

I found this post in the forum, which says this is caused by restorePreviousSession used together with different redirect URLs. This sounds like the problem for me.

So, my question is: how can I get out from this situation, from the user side?
I cannot log-out at the moment, so cannot clear the session (unless using browser Dev Tools).

Example Apps for reproduction:

Unfortunately authentication is bound to the domain, so if you host apps on the same domain, you’ll run into issues like this. I’m not aware of a way around that other than using different domains.

1 Like

There is currently a feature request for this on solid-client-authn: Host several applications under the same origin · Issue #1647 · inrupt/solid-client-authn-js · GitHub. However, there are a lot of assumptions made for things coming from the same domain, so I’m not sure it how possible it is to properly handle authentication to separate clients if they share a same origin.