miniflux / v2

Minimalist and opinionated feed reader
https://miniflux.app
Apache License 2.0
6.99k stars 727 forks source link

Unable to use Authelia for oauth2 login #2926

Closed buswedg closed 3 weeks ago

buswedg commented 3 weeks ago

This is unlikely a bug, and more likely an issue with my configuration -- But I'm having trouble getting miniflux to integrate with authelia to allow oauth2 login.

I've added the below env vars to my miniflux docker container:

WEBAUTHN=0
OAUTH2_PROVIDER=oidc
OAUTH2_CLIENT_ID=miniflux
OAUTH2_CLIENT_SECRET=[secret]
OAUTH2_REDIRECT_URL=https://miniflux.domain.com/oauth2/oidc/callback
OAUTH2_OIDC_DISCOVERY_ENDPOINT=https://auth.domain.com
OAUTH2_USER_CREATION=1

And have added the below to my Authelia config:

clients:
  - client_id: 'miniflux'
    client_name: 'Miniflux'
    client_secret: '[secret]'
    public: false
    authorization_policy: 'one_factor'
    consent_mode: 'pre-configured'
    pre_configured_consent_duration: '1 week'
    redirect_uris:
      - 'https://miniflux.domain.com/oauth2/oidc/callback'
    audience: []
    scopes:
      - 'openid'
      - 'groups'
      - 'email'
      - 'profile'
    userinfo_signed_response_alg: 'none'

When I browse to https://miniflux.domain.com, I'm presented with only the standard web form user/password to login.

I checked the settings for miniflux (via the app portal) using the auto generated admin account. And I can't see any option which would allow an oauth2 login, nor anything which would allow the user to disable the standard web form user/password fields.

So, I'm curious if I need to manually add some kind of middleware code to the app the allow an option to select oauth2 login on the miniflux landing page. Or am I missing something in my env configuration which would automatically present this option?

Note that I've successfully integrated authelia with other apps on the same server. All handled via nginx proxy manager. So, I think the issue is on my miniflux configuration side.

buswedg commented 3 weeks ago

Never mind. This ended up being due to a spelling mistake on my OAUTH2_PROVIDER var. It is correctly shown above, so hopefully this helps others looking to integrate miniflux + authelia in the future.