Skip to content

Login loop on Beszel when deployed behind Authelia #94

@JuanMM94

Description

@JuanMM94

When Beszel is deployed behind Authelia as a forward auth middleware, login appears to succeed but immediately fails with "Failed to authenticate / Please log in again."

If Authelia's forward auth is protecting all routes including /api/*, it intercepts this request and returns a 303 redirect instead of passing it through to Beszel breaking the session before it starts.

I added bypass rule in Authelia for Beszel's API endpoints, placed before any wildcard domain rules:

- domain: 'beszel.example.com'
  resources:
      - '^/api/.*$'
  policy: 'bypass'

This worked for me at least. It should go before the catch-all rules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions