Setting user authentication source and sign-in name through CLI

I have configured Keycloak as OpenID provider in Gitea. Logging in with users defined in Keycloak requires identical users to be defined locally in Gitea, though I understand that better integration comes with the resolution of issues 7633 and 5123.

In the mean time: is there any possibility to configure the user with the correct authentication source and sign-in name through the CLI when creating the user? I do not see the options in the Usage: Command Line - Docs list op options…

You can do it via CLI, look for add-oauth admin subcommand on the page you linked (note: the page you linked is for 1.14-dev, and may be slightly different for most recent stable version of 1.13.3, please refer to CLI help text using -h when running gitea via command line)

Thx for the reply.
I did that for defining the Keycloak authentication source globally and that works perfectly fine.

However, if you go to site administration->user accounts, the users remain linked to “local”. I have to manually set them to Keycloak for it to work properly in Firefox. In Google Chrome it works somehow.

And I was wondering how I can set that user config to the keycloak authentication source and adding the associated username. I cannot seem to do this using the command you proposed…