Authelia log in disabled
I am using caddy + authelia
for immich reverse proxy and authentication but I get
Login has been disabled.
authelia config client:
caddy configuration:
normal authentication is working
28 Replies
And what changed did you do on the immich side?
if I clean cookies I open immich I first that above screenshot then the login windows plus login with oauth, if I click there I get redirected to authelia domain I can login and the I am redirected back to login has been disabled
instead if I clean cookies and open immich after the login screen disabled login in with immich auth I can log in
OAuth involves two parts: (1) redirect to authelia get code, redirect back to immich, then (2) validate code and log you in.
Sounds like you are saying part one is working and part two is erroring out. Can you check the immich server log?
click on the login with oauth and get here

Yeah this is all looking good
if I accept I get back to login is disabled
and now it worked 😄
Yeah sounds like an error with part 2 of oauth
Lol what
WTF
in the log I am seeing lots of 'hackers' trying to authenticate on my server
is there anyway to prevent that?
You may want to disable password auth entirely
You could also look at using fail2ban to block bad ips
I have disabled also the autoregister
done disabled password auth
I will check fail2ban with Caddy or crowdsec
thank you
Lol i didn't do anything, but anytime 😛
I think the problem was that it took some time for authelia to pass the handshake back to immich
Possibly... I think we upped the timeout though.
I assume you are running a fairly recent version of immich
1.50.0 build 88 ios
server is 1.50.1
Yeah, it has a timeout of 30s
.https://github.com/immich-app/immich/blob/main/server/libs/domain/src/oauth/oauth.core.ts#L23
GitHub
immich/oauth.core.ts at main · immich-app/immich
Self-hosted photo and video backup solution directly from your mobile phone. - immich/oauth.core.ts at main · immich-app/immich
🆗
Can you look at the immich web logs?
can you explain me a bit the session duration?
nevermind
I found an issue with the authelia config
Ah ok.
session:
inactivity: 5m
That should be fine actually
how does this not affect the mobile session?
We only use the token that this is probably referring to once and then issue our own session token.
ok clear
So as long as the login process doesn't take longer than 5 minutes to complete it should be fine lol
Immich sessions are non-expiring now.
Although I think we missed one change for the web where a cookie was still expiring after 7 days. Should be updated in the next release.
Ok roger that
Now i have to focus on fixing hairpin nat
Does your router support that?
Mikrotik routeros i hope so