Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solid authenication doesn't work between examples #18

Open
NoelDeMartin opened this issue Dec 19, 2021 · 6 comments
Open

Solid authenication doesn't work between examples #18

NoelDeMartin opened this issue Dec 19, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@NoelDeMartin
Copy link
Member

As noticed by @bourgeoa, when you log into one of the Solid examples, you can't use the other ones without logging out first.

I'm not sure there's an easy way to solve this problem without complicating in excess, but at least we can have this issue open in case someone stumbles upon the problem.

@NoelDeMartin NoelDeMartin added the enhancement New feature or request label Dec 19, 2021
@NoelDeMartin NoelDeMartin mentioned this issue Dec 19, 2021
@rosano
Copy link
Member

rosano commented Dec 19, 2021

Interesting. If there's a simple explanation for why, I'd be curious to know.

@NoelDeMartin
Copy link
Member Author

I think the explanation is that the authentication library stores data under localStorage, and given that the applications are run on the same domain (hello.0data.app, localhost:3000, etc.), the storage is shared so it thinks that you're logged in and takes you back to the original url you logged in from (hello.0data.app/solid/solid-rest-api, localhost:3000/solid/solid-rest-api, etc.). It's generally a bad idea to serve multiple apps from the same domain (I've made that mistake myself), but for this examples it may be overkill to have a subdomain per each one

@rosano
Copy link
Member

rosano commented Dec 19, 2021

Ok, I misunderstood it as the opposite… After logging in with the REST example and viewing solid-file-client, it 'automatically presents the data from my account'—I actually like this and would consider it a feature as it demonstrates fluidity despite using different approaches.

@NoelDeMartin
Copy link
Member Author

I actually like this and would consider it a feature as it demonstrates fluidity despite using different approaches.

I'm not sure if we're still understanding each other. When you log into the REST API example, if you then try to use the solid-file-client example you'll be redirected to your identity provider and then back to the REST API example. So you won't be able to use the solid-file-client example without logging out from the REST API first, and the problem is that since the UI is the same maybe you don't even notice.

Given that this is targeted to developers understanding the code, and possibly tinkering with it, I think that's a problem.

@bourgeoa
Copy link
Contributor

Could we try to automatically logout when leaving a solid page app ?

@rosano
Copy link
Member

rosano commented Dec 20, 2021

I'm not sure if we're still understanding each other. When you log into the REST API example, if you then try to use the solid-file-client example you'll be redirected to your identity provider and then back to the REST API example. So you won't be able to use the solid-file-client example without logging out from the REST API first, and the problem is that since the UI is the same maybe you don't even notice.

Whoops, that's exactly what happened! Nevermind what I said.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants