[solved] Oauth2 access_token api - user not exist

Hello,

Testing oauth2_client authentication with gitea, using OIDC as the provider. It works very well on the UI and im also able to map scope groups to org/teams, which is great!

I want to see if the api side accepts the JWT from the provider, as the docs say, but when i try it, i get the error message:

{
    "message": "user does not exist [uid: 0, name: , keyid: 0]",
    "url": "https://gitea-dave.domain.net/api/swagger"
}

I tried this both on the /api/swagger page and on postman with the exact same error above.

I’ve tried it as a header and a parameter in the URL query string but no change.

Using v1.20.2 from docker latest-rootless image.

What could i be doing wrong?

Any input is appreciated

Best,
Dave

Just noticed that the api oauth2 link is regarding gitea “acting” as a oauth2 provider.

So probably the OP question is moot for now.

I have the same use case: trying to authenticate to the Gitea API with a Bearer Token. It looks like the API only supports Basic Auth or use of API Token unfortunately.