Skip to content

Invalid oauth RefreshToken makes user become inactive when syncing users from oauth provider #34742

Open
@imhun

Description

@imhun

Description

oauth login: keycloak

Problem

git pull repo use app token,when oauth login session expired ,git pull error message:
/data.git/info/refs not valid: could not determine hash algorithm; is this a git repository?

gitea home page display:
Your account is prohibited from signing in, please contact your site administrator.

gitea service log message:

2025/06/17 01:54:10 HTTPRequest [I] router: completed GET /bytefabric/data.git/info/refs?service=git-upload-pack for 100.127.131.23:22476, 401 Unauthorized in 35.6ms @ repo/githttp.go:511(repo.GetInfoRefs)

2025-06-17T09:54:10.398305175+08:00 2025/06/17 01:54:10 routers/web/web.go:148:init.verifyAuthWithOptions.1() [I] Failed authentication attempt for xxx from 100.127.131.23:22476

It works properly if we log in again through the oauth login.

Expected

I understand that if git pull uses the app token, it should be able to function normally as long as the token is not expired, and there should be no need for the user to log in again.

Gitea Version

1.37-1.24

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.49.0

Operating System

k8s on linux arm64

How are you running Gitea?

k8s 1.32,gitea helm charts:12.0.0

Database

PostgreSQL

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions