AMP icon indicating copy to clipboard operation
AMP copied to clipboard

Setup OIDC with Authelia - State missing or weak, redirect loop

Open benfugate opened this issue 7 months ago • 3 comments

Operating System

Ubuntu 24.04.4 LTS

AMP Version and Build Date

2.7 - 20260308.1

AMP Release Stream

Mainline

I confirm that

  • [x] I have searched for an existing bug report for this issue.
  • [x] I am using the latest available version of AMP.
  • [x] my operating system is up-to-date.

Intended Action

I have been trying to add OIDC login to my AMP instance using my existing Authelia server (which works fine for all my other services) by following the guide made for Authentik

Expected Behaviour

Successfully authenticate via OIDC and be redirected to the AMP dashboard.

Actual Behaviour

Whenever I try to go to AMP’s login page after enabling OIDC, I constantly get redirected back and forth repeatedly between my AMP and Authelia webpage in my browser.

AMP sends state=&nonce= (empty strings) in the authorization request. Authelia enforces a minimum state entropy of 8 characters per the OAuth2 spec. Setting minimum_parameter_entropy: -1 in Authelia does not resolve the issue.

This is reproducible with any strict OIDC provider. A prior report against Authelia specifically was filed in January 2026 and auto-closed without resolution: https://discourse.cubecoders.com/t/setup-oidc-with-authelia-state-missing-or-weak-redirect-loop.

Reproduction

  1. Configure Authelia as an OIDC provider for AMP following the Authentik guide
  2. Set Login.UseOIDC=True in AMPConfig.conf
  3. Navigate to the AMP login page
  4. AMP initiates the OIDC flow and redirects to Authelia
  5. Authelia rejects the request and redirects back to AMP with error=invalid_state
  6. AMP immediately retries, creating an infinite redirect loop

benfugate avatar Apr 15 '26 22:04 benfugate

Please try again on 2.7.2.6 or later. There were fixes applied to this area.

IceOfWraith avatar May 19 '26 04:05 IceOfWraith

Any updates on this?

Gallardo7761 avatar Aug 08 '26 06:08 Gallardo7761

This is addressed in the coming 2.8.0.6 release.

IceOfWraith avatar Sep 18 '26 07:09 IceOfWraith