Option to automatically attempt OpenID login if configured

I’m using OpenID via Authentik to login to Vikunja.
Every now and then I get logged out of the app and need to authenticate through OpenID again.
I’d still be logged in to Authentik, just the Vikunja bit needs to be updated regularly.

The login process would be greatly streamlined if there’d be the option to automatically attempt to login using OpenID instead of requiring user interaction.

Is the openid provider the only option to log in with? Then it should redirect you automatically.

Hi, do you mean it’s already implemented or it should be ?

My config looks like:

auth:
  local:
    enabled: false
  openid:
    enabled: true
    redirecturl: https://vikunja.redacted.com/auth/openid/
    providers:
      - name: openid
        authurl: https://auth.redacted.com/auth/realms/redacted
        clientid: redacted
        clientsecret: redacted

So openid is the only option to log in with. But login page still display and wait for user to click on “login with openid”.

PS: vikunja is dope <3

What version are you using?

Note there’s been a change recently to only log users in automatically when a Get-Parameter redirectToProvider=true is provided so that it is possible to log out.

I’m using 0.20.1.

Ok indeed /login?redirectToProvider=true does autologin.
But /lists/2/kanban?redirectToProvider=true does not and display login page.
Actually I think I was fine with previous behavior described in Automatically redirects if only one Oauth provider · Issue #90 · go-vikunja/frontend · GitHub :slight_smile: Maybe we need an option “autologin: true|false” in settings ?

The parameter only works with the latest unstable build.

No matter how we do it, someone will complain. sigh.
Adding options to the frontend is always a hassle and logging out does not work when automatically redirecting so I won’t change this again. Having a Get-Parameter solves the use-case the automatic redirect was intended to solve.

My usecase is the exact same as Philpep mentions.

Sorry for the long delay on my response, but it’s great to see that there’s already an update in the works! :slight_smile:

Edit:

After playing around with the unstable version for some time the lack of automatic login as indicated by Philpep in #5 becomes apparent. That is percicely the inconvenience that an autologin would prevent.

Regarding the inability to log out due to the automatic redirect: this could actually be solved in quite the same way as the redirectToProvider=true parameter now works, but just oposite. When logging out, the user could be redirected to e.g. /login?logout=true or /login?redirectToProvider=false to indicate the user just logged out and should not be redirected. This logic just inverts the use of the parameter and should easily be configurable in the yaml config file.