share-me icon indicating copy to clipboard operation
share-me copied to clipboard

Visiting logged in user's settings or profile logs them out

Open sypion opened this issue 1 year ago • 6 comments

Whenever a logged-in user attempts to visit Settings or their Posts page, they are logged out. I also can't view/create API tokens as a result.

sypion avatar May 28 '23 21:05 sypion

Interesting! That sounds like an incorrect setup somewhere with your reverse proxy. I'm using Traefik and do not experience that issue. Can you provide any additional insight into your setup and how it's running?

Ynd21 avatar May 30 '23 17:05 Ynd21

Hi @Ynd21! I'm using Nginx Proxy Manager and set up two custom locations for /api and /_. Doing so seems to work properly and leads to the correct URL. Screenshots: image image

Additionally, no errors appear on the logs of either container.

sypion avatar May 30 '23 19:05 sypion

What auth methods do you have enabled?

Dan6erbond avatar May 30 '23 19:05 Dan6erbond

Just OAuth2.

sypion avatar May 30 '23 20:05 sypion

I doubt that this is causing the issue, but could you add /_next as a forward to the frontend? It's not quite ideal, but because mobile browsers remove the trailing slash you need to forward /_ to the PocketBase UI, but /_next since that's where assets and some JSONs are hosted.

As for the other issue I'll have to look into it. Can you provide any console logs? You can open the Developer Tools with F12 and check out the network tab for additional debugging information as well.

Dan6erbond avatar May 31 '23 08:05 Dan6erbond

Apologies for the delay. Adding /_next as a forward does not make a difference, unfortunately.

Here are the console logs I receive when navigating to my user's settings: image

sypion avatar May 31 '23 20:05 sypion