Vikunja API and Cloudron
I'd like to utilize the Vikunja API. However, it looks like all of the requests require JWT-Auth with the exception of calDAV requests. If I'm reading the API docs correctly then this would require Open ID Connect to utilize the API.
Has anyone here been able to set this up? I believe Vikunja user management is currently handled by the app and it looks like we can configure Open ID in the config.yml — I assume changes made here would persist through upgrades?
I found this forum topic on using Kopano Meet as an OIDC provider. This looks promising. Is anyone else using an app that is dedicated to authentication like Authelia or Keycloak on Cloudron?
Lastly, would doing something like this require changing the CSP headers? This is where I start to get lost.
Thanks in advance for any input!
@colonelpanic I think you have to call https://try.vikunja.io/api/v1/docs#tag/user/paths/~1login/post which will give you the JWT token that you can use in the Authentication header for future requests.
@girish - Oh geez. I feel like an idiot for missing that. Thanks for pointing it out! Now I just need to figure out the one time password portion. Thanks!
Also, in regards to CSP. I know they can be edited there, I was just not sure if it would be necessary to add something if using OIDC. It is now irrelevant with the info you provided.
@girish, I am using a OTP with Vikunja—but I opted to create a new user and share only the lists I want to automate with that user. I think I'm good to go for now.
@fbartels, thanks for confirming! I have more questions regarding CSP, but I'll try to do some research on my own and start a new topic in the correct category if needed.
kolaente last edited by
Hi! (Vikunja dev here)
As @girish correctly pointed out, you don't need to enable openid to use the api. In fact, when you're using the Vikunja Frontend or Desktop app it already uses the api. The login endpoint is your way to go to get the api token.
I hope to build "classic" api tokens in the future you may know from other websites (like github) where you can create a long-lived token in the user settings and use it without a login.