Authenticate to API with OIDC

I’d love to have a CLI client to create tasks, so I was checking out how I could try to create something. I saw the API docs and the section about cli development at Cli Commands | Vikunja.

The API docs state

After a redirect from the OpenID Connect provider to the frontend has been made with the authentication code, this endpoint can be used to obtain a jwt token for that user and thus log them in.

Where to get that authentication code?

You get the code from the third party auth provider. Basically you register your vikunja instance with it, they give you a token which you then use to say “hey it’s me, please authenticate that user”, the provider shows the user a login form and redirects them after successful login to the frontend with an authentication code which the api can then use to get an API token for the OpenId api endpoint of the third party. That’s the standard oauth/OpenId flow, I’d recommend reading up on that if you’re interested in the details.

You might want to start with the local login though: Vikunja API documentation

If you want to build a cli for users to interact with Vikunja, I think it would be a good idea to have that as a separate application and not build it into the vikunja api binary itself (that’s what the docs you mentioned are meant for).