fablabbcn / smartcitizen-web

The Smart Citizen Kit platform
https://smartcitizen.me
GNU Affero General Public License v3.0
13 stars 7 forks source link

Visiting user page redirects to login #418

Open pral2a opened 4 years ago

pral2a commented 4 years ago

Expected behaviour

When searching for a user and clicking on it I want to see the user profile even when I am not logged in

Actual behaviour

When searching for a user and clicking on it I'm redirected to login

How to reproduce?

issue

viktorsmari commented 4 years ago

Works fine for me (not logged in) on Linux, both Chromium and Firefox

tuengominh commented 4 years ago

I also don't have the issue. I can see the user profile when I am not logged in (Chrome and Safari).

pral2a commented 4 years ago

I found the issue. It looks like it's linked to the auth cookie persisting in your browser even after you logged out. Just deleted all the site cookies and the issue vanished away.

So it might be linked with the log out function.

https://github.com/fablabbcn/smartcitizen-web/blob/ffc651576d5ef0dfd1c1247bde2dac5ec5df64a4/src/app/core/api/auth.service.js#L133-L135

Could you try to replicate the issue?

tuengominh commented 4 years ago

Hi @pral2a!

I couldn't reproduce the issue, before and after clearing my browsing data. Actually, is that what you mean?

pral2a commented 4 years ago

Yes, log in, log out and then do a search to visit a user profile. It it fails then clear the cookies and try it again.

tuengominh commented 4 years ago

Hi @pral2a

Sorry for getting back late to this. I tried to replicate the issue by logging in, logging out, and then searching to visit a user profile, but it worked fine for me. Do you still have the same issue?

Thanks

oscgonfer commented 7 months ago

@pral2a this is what I was referring to before. The issue is still there, reproduced with firefox, chrome in linux.