proudcity / wp-proudcity

The ProudCity WordPress platform
https://proudcity.com
Other
21 stars 9 forks source link

Getting redirected back to 'Sites' dashboard when visiting public site as logged in user #2150

Open lukefretwell opened 1 year ago

lukefretwell commented 1 year ago

Source

Describe the bug

When logging in to MyProudCity and visit the public site (ex: proudcity.com), I get redirected back to the MyProudCity sites dashboard.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'MyProudCity'
  2. Login
  3. Go to site dashboard
  4. Click 'Visit site'

Expected behavior

Expect to see the public site when logged in as an admin.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

lukefretwell commented 1 year ago

Other notes from Slack:

Looks like it happens when you go to the admin after visiting the sites page.

When I clear cookies and view this per page:

On sites, I get 1 cookie from proudcity.com, 5 from auth0.com.

On admin, I then see 7 cookies from proudcity.com, 5 from auth0.com. Seems like whatever those 6 extra cookies that are added from proudcity.com could be the culprit?

It’s really weird, though, because I don’t experience this issue on some sites.

Also, it’s browser agnostic. For some it happens on Chrome, some it doesn’t. Same with Edge.

lukefretwell commented 1 year ago

there's probably a setting that needs to be adjusted somewhere in auth0, or in the auth0 wp plugin. it kinda sounds like a same-site cookie setting

kevindherman commented 1 year ago

@lukefretwell @curtismchale zendesk ticket 6212 for Solano GIS isn't able to get in using any browser.

"No change in Firefox, Chrome, or Edge on my personal PC off the County network."

lukefretwell commented 1 year ago

When I delete the proudcity.com cookies, I still get this issue, but when I delete the auth0 ones, it kind of goes away. I was logged in in private mode and it redirected me back to sites. When I deleted the proudcity.com cookies and refreshed, it still showed me logged in and redirected me. When I deleted the auth0, the admin bar was gone and I can now see the public site in private mode.

I thought it might be a cookie from one of the plugins but definitely seems more related to auth0.

lukefretwell commented 1 year ago

Not getting a redirect for this page (note it doesn't have admin bar):

https://proudcity.com/?gf_page=preview&id=9

curtismchale commented 1 year ago

I've just noticed that your logged in cookie does not get cleared when you try to log out of a site. I'm currently looking at Petaluma and after trying to log out, I'm logged out of the PC dashboard, but still have the authorized cookie for Petaluma. When I click "logout" on Petaluma I see I'm logged out of the dashboard to my.proudcity.com but when I return to Petaluma I'm logged in and can access everything on the dashboard.

lukefretwell commented 1 year ago

More input:

Chrome or Chrome Incognito mode Edge or Edge Incognito Mode Firefox or Firefox incognito equivalent Safari

That's consistent across mobile and desktop experiments.

I can sign in and get past the authorization challenge, but I don't see an option to "manage site." I can toggle the menu in the upper right-hand corner and see "Support," "Docs," "Feedback," "My Sites," and "Account."

All of those load, except for "My Sites" which does nothing when selected.

kevindherman commented 1 year ago

Post update input:

My apologies for the late reply it’s been a little busy here. I tried your suggestion and below are my findings.

  1. No change using chrome or edge I still get immediately redirected if I have signed into Proud City.

  2. I did discover that if I clear the cache using edge and DO NOT login into Proud City using edge I can view just our website without being redirected.

My work around for now is I am using chrome for edits and edge to see the edits, on the website.

kevindherman commented 1 year ago

Testing notes:

I also tested logging out from my.proudcity.com

Although it’s not perfect and can be cleaned up, it’s definitely better than the looping if it resolves that issue. Cleanup should focus on the logout out experience from the website and the screen they land on.

From slack discussion with @lukefretwell @curtismchale let's deploy this fix and then circle back on cleaning up the page not found issue later.

curtismchale commented 1 year ago

@lukefretwell @kevindherman We pushed a fix for this so that users don't get sent back to the PC dashboard. Does that conclude this issue and we'll resolve further Auth0 stuff as we look at the latest versions of Auth0?

Can we close this issue?

This was deployed with this tag: https://github.com/proudcity/proud-recipes/releases/tag/2023.02.08.1049

kevindherman commented 1 year ago

@curtismchale I don't think so. I just tested this for sites that I noticed the looping issue and the below is what happened.

Screen Shot 2023-02-08 at 4 31 14 PM

@curtismchale @lukefretwell I hope that the page loading to this logout request and not redirecting all the way to my.proudcity.com helps provide more clues.

kevindherman commented 1 year ago

We've had success with adjusting third party cookie settings.

lukefretwell commented 11 months ago

Adding these as reference per conversation with @curtismchale:

Screenshot 2023-11-09 at 4 15 55 PM

Screenshot 2023-11-09 at 4 15 19 PM

lukefretwell commented 9 months ago

@curtismchale I still experience this issue and have to view public changes in private mode.

curtismchale commented 9 months ago

@lukefretwell then I guess open it again but I never see it and unless I can get a specific scenario under which I can reproduce the problem there is nothing I can do to fix it.

We've consistently seen that the issue is a user configuration one not anything with our system. Have you tried wiping and reinstalling your browsers, or your system? I know this is a drastic step, but I really don't know what else to say.

lukefretwell commented 9 months ago

@curtismchale it has something to do with browser settings/add-ons/plugins I believe. We created this post that seems to help, but I'll re-open so we have it visible and hopefully with the account changes we can resolve it. Note that it only happens for me on some sites, but not all, so it's something we should be able to find.

https://help.proudcity.com/configuring-browser-privacy-settings/