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

Unable to authenticate #804

Open
gardiol opened this issue Mar 11, 2024 · 8 comments
Open

Unable to authenticate #804

gardiol opened this issue Mar 11, 2024 · 8 comments

Comments

@gardiol
Copy link

gardiol commented Mar 11, 2024

I run Silverbullet behind a NGINX reverse proxy that provides SSL + authentication. I use firefox on all my systems (latest release, 123.0.1 )

  1. Open firefox and open "notes.mydomain.com", enter authentication in pop-up browser window
  2. use Sulverbullet just fine
  3. Close browser (which will clear authentication)
  4. Open browser again and open "notes.mydomain.com" again, authentication popup doesn't appear
  5. In dev console i see all referenced files are 401 unauthorized (which is correct since i didn't authorized...)

Works fine in Chrome, but that's not the point. In my experience this issue could be caused by cached files on the client, which seems to be the issue. Usually tough, at the first request the browser auth windows is displayed, not in this case.

I can provide access to my server if needed to repeat the issue (but in private, ofc).

@gardiol
Copy link
Author

gardiol commented Mar 11, 2024

As an added note, this happens also from Firefox mobile sometimes.

(i please ask not to reply "just use chrome" :) )

@gardiol
Copy link
Author

gardiol commented Mar 11, 2024

It's the same issue reported here:
Firefox bug report

@gardiol
Copy link
Author

gardiol commented Mar 11, 2024

More info: i totaly deleted my firefox session and started from a fresh one and the issue persist

zefhemel added a commit that referenced this issue Mar 11, 2024
@zefhemel
Copy link
Collaborator

zefhemel commented Mar 11, 2024

So without having to replicate your setup, in the referenced commit I'm now checking for the 401 status and reloading the page as a result. I'm not sure this will actually help, but I'm not sure what else to do. Many auth layers will send a redirect header to the auth page, which SB will follow (SB's native authentication does this as well as authelia). But in case of a 401... not sure what it should do. I could show an alert, but... what then?

You can try this out on the edge builds: https://community.silverbullet.md/t/living-on-the-edge-builds/27

@gardiol
Copy link
Author

gardiol commented Mar 12, 2024

That might work i guess, but since i am on bare metal i cannot test a docker build right away, maybe you can share a ubild or i will wait until the commit makes to releases

@aorith
Copy link

aorith commented Mar 12, 2024

AFAIK you can use: zefhemel/silverbullet:edge (https://community.silverbullet.md/t/living-on-the-edge-builds/27)

@zefhemel
Copy link
Collaborator

I've just updated the linked instructions for edge (https://community.silverbullet.md/t/living-on-the-edge-builds/27) to also include how to run this with straight Deno without using Docker.

@gardiol
Copy link
Author

gardiol commented Mar 22, 2024

things have improved, it might be fixed but i need some more time to test.

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

No branches or pull requests

3 participants