mirror of
https://github.com/go-sigma/sigma.git
synced 2026-10-28 16:34:34 +08:00
The callback stored the access and refresh token on user_3rdparty and re-issued the code repository sync on every login, which only worked because the login refreshed an expiring token. Credentials now live in the clone credential table, so the tokens have no reader left. - drop the token update on repeated login and the token fields from both binding-creation paths; Oauth2UserInfo no longer carries them - stop publishing a sync task when a binding is created: there is no credential at that point, so the task could only report a failure - derive the GitLab and Gitea OAuth endpoints from scm.providers[].baseUrl instead of hardcoding gitlab.com, and point Gitea at its own /login/oauth endpoints and redirect callback Verification: - CI_DATABASE_TYPE=turso go test -tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./pkg/service/oauth2/...