Arlen22 / TiddlyServer

v2 - A static file server that can also save files and mount TiddlyWiki folders
https://arlen22.github.io/tiddlyserver/
MIT License
256 stars 36 forks source link

Having trouble when logging in using Firefox on Android #109

Open TheYsconator opened 3 years ago

TheYsconator commented 3 years ago

When I try to login using Firefox on Android my phone displays the green 'success' text, prompting me to go back and refresh. Whenever I do that (or paste the URL of the wiki again), I get a 403 error as if I have never logged in (e.g.; as if the cookies have not been set).

The server responds to the call of the login page with a 200 status code, and indeed with a 403 status code when I immediately thereafter go to my wiki.

Chrome on Android does work properly, though I see no reason as to why Firefox shouldn't work. I'm running the server using Caddy, which showed no odd logs. Firefox on Android behaves the same when my protection (anti-tracking, etc.) settings are all set to their lowest options.

Arlen22 commented 3 years ago

I'll add a link to return to the home page. In the mean time you should be able to manually type the URL into the browser. If that doesn't work can you make sure that the Set-Cookie header and subsequent Cookie headers appear correctly?

TheYsconator commented 3 years ago

Hmm so re-typing the URL does not seem to resolve the issue.

I plugged my phone in my computer and used Firefoxe's remote debugging tools to inspect what was going on. I started by clearing out all cache and memory for the subdomain my wikis are on (so the subdomain of the TiddlyServer). Then I logged in (which succeeded), and then I went back using the refresh button I have in those debugging tools. With that I was able to view the list of my wikis!

However, when I quit the browser and opened it again (debugging tools still connected), I was not able to log in again (the cookies were unset). Below are some screenshots.

Going to the index page just after clearing cache and storage:

1_fresh

After logging in:

2_on_login

Going back to the index page (which worked):

3_on_list_working

After having closed the browser and opened it again (which didn't work):

4_on_after_reload_browser