Closed chriexpe closed 2 months ago
Please paste the error string from the devtools console. Also, look at the server responses in the Network tab. What do they say?
Additionally, have you tried asking in Discord? I think I remember someone saying they used Authelia, might be useful asking them if they noticed any quirks.
Thanks, but later I realized this was an issue with browser cache because I was able to access it from another computer... Cleaning the cache solved it and it's working fine now!
Thanks, but later I realized this was an issue with browser cache because I was able to access it from another computer... Cleaning the cache solved it and it's working fine now!
Then I'll close this as resolved. There's plans to be able to use external auth with autobrr and disable built in auth, but we have a lot of concerns with building a solution that is too easy to disable, which would expose autobrr to the world without auth.
Hi, I would like to chime in and confirm that indeed this is still an issue.
I have tracked down that it is most likely caused because of a service worker caching wrong responses and is probably connected to an open issue over at authentik's repo: https://github.com/goauthentik/authentik/issues/5603
Unregistering the service worker and refreshing the page makes autobrr work again.
Hi, I would like to chime in and confirm that indeed this is still an issue.
I have tracked down that it is most likely caused because of a service worker caching wrong responses and is probably connected to an open issue over at authentik's repo: goauthentik/authentik#5603
Unregistering the service worker and refreshing the page makes autobrr work again.
Yeah apparently clearing cache only works temporarily, this error always comes back
Is this still an issue on 1.27.1? I fixed the api route in 1.27 which impacted many other things before that fix. We're still begging for an offline modal for the PWA.
Thanks, but later I realized this was an issue with browser cache because I was able to access it from another computer... Cleaning the cache solved it and it's working fine now!
Then I'll close this as resolved. There's plans to be able to use external auth with autobrr and disable built in auth, but we have a lot of concerns with building a solution that is too easy to disable, which would expose autobrr to the world without auth.
You can implement something like this BeryJu/hass-auth-header, if the user on HASSIO is the same as the Authentik's one it bypass login page, if not you have to manually login there too. I use it and works great.
Is this still an issue on 1.27.1? I fixed the api route in 1.27 which impacted many other things before that fix. We're still begging for an offline modal for the PWA.
The error code changed, but it's kinda like the issue described by Gylesie, once Authentik's token expires this error happens.
If I open the browser debug, on console there are a bunch of 302 error code like this one:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https:// .com/application/o/authorize/?client_id= &redirect_uri=https%3A%2F%2F .com%2Foutpost.goauthentik.io%2Fcallback%3FX-authentik-auth-callback%3Dtrue&response_type=code&scope=email+ak_proxy+openid+profile&state= . (Reason: CORS request did not succeed). Status code: (null).
On that Authentik code that I pasted on top it mentions this 302 code.
Self-signed cert? CA?
I have just noticed that the /outpost.goauthentik.io/start responsible for getting new tokens is also getting cached. It should return a 302 to authentik's instance in order to get a new token. But autobrr service worker just returns 200 page with a title: Oops, looks like there was a little too much brr!
Is the service worker caching 3xx responses as well? Is is feasible to cache only 2xx responses?
After the token expires, essentially any request to autobrr gets 302'd to authentik, to a different domain to get a new token - that requires the Authentik user to be logged in, otherwise they are shown a login form. After that the user should get redirected back to the original page that triggered the 302, however this seems to be kind of broken as per the linked issue.
Is there anything that autobrr can do to handle this? Maybe a way to disable service worker caching altogether?
Self-signed cert? CA?
It's CA (you add on SSL Certificates tab on NGINX), but as Gylesie commented, it has something to do on how Autobrr handles session token (because I've never had this issue before with other services behind Authentik).
I can confirm that this issue still occurs when using Authentik with Traefik Forward Auth.
Hi everyone!
We opened a pull request with a speculative fix for this problem. It would be very much appreciated, if those who ran into that problem could test our fix.
Be careful when updating to this PR! Your database will receive a schema update so we advise you to stop autobrr first and make a backup of your database, before updating to this PR. https://autobrr.com/installation/transfer-installation#backing-up-your-current-installation
@dmptrluke @Gylesie @chriexpe
Hey @martylukyy ! Is there a published docker image with the changes that we could use?
Yes sir. Docker tag pr-1088
Yes sir. Docker tag
pr-1088
Thank you! I can confirm that this in fact fixed the issue. However, to make background fetch requests work after authentik's proxy token expires, I had to make a compromise and disable authentik for API paths that begin with: \/api(?!\/auth)
.
Thank you for testing and for providing the information about the background fetch requests!
Version Docker running on Unraid, latest flag
Describe the bug After using Authentik's custom NGINX PM config AutoBrr page loads but with this error:
What is Authentik Authentik is an identity provider, basically it locks any self hosted service like in my case Home Assistant, Filerun, Deluge etc. behind a more secure login page, the setup is straight foward, you add on Authetik just the service name, login provider that you want to use (in my case proxy provider) and the final https URL of that service (Ex: https://autobrr.example.com/), and on NGINX you paste the config below into "Advanced" > "Custom Nginx Configuration" and it's working. It's pretty generic and most of the time it's the exact setup and code.
Custom Nginx Configuration:
Screenshots