liberapay.com icon indicating copy to clipboard operation
liberapay.com copied to clipboard

Add Forgejo (Gitea fork) linked accounts (Which Codeberg runs on)

Open Venefilyn opened this issue 1 year ago • 5 comments

Similar to #943 but relates to the Forgejo fork which Codeberg runs on now

Would be great to link to other non-profits than stuff like GitHub

Venefilyn avatar Aug 12 '24 11:08 Venefilyn

Agree - would like to verify my identity via Codeberg.

donn-xx avatar Nov 24 '24 12:11 donn-xx

Also agree, I'm looking for this (and have no other active Git account) 🥺

DansLeRuSH avatar Feb 14 '25 14:02 DansLeRuSH

This would be very helpful for me, I also know numerous other Liberapay folks whose main forge is Codeberg.

Moreover, Foregejo and Codeberg are more aligned with Liberapay's values, while Microsoft GitHub is actively opposed to them.

mooseyboots avatar Aug 01 '25 09:08 mooseyboots

I too would love this.

However, Forgejo currently does not support OAuth2 scopes, meaning that authenticating an outside service like Liberapay is only possible by giving it administrator rights. So for now, authenticating Liberapay would require the user to trust it with everything. (Thanks to Noisytoot in the Codeberg IRC for explaining this to me.) https://forgejo.org/docs/latest/user/oauth2-provider/

They do apparently plan to implement scopes some day: "OAuth2 scopes are not yet implemented"

Once that's done, the task on the Liberapay side is likely rather small. The crucial code seems to be in liberapay/elsewhere, e.g. liberapay/elsewhere/gitlab.py. Perhaps Forgejo integration needs slightly more complex code than GitLab does, like that in liberapay/elsewhere/mastodon.py; but it still seems perfectly doable for someone with moderate Python knowledge to go and write a patch.

(The central class, PlatformOAuth2, is defined in liberapay/elsewhere/_base.py.)

schultzdavid avatar Aug 04 '25 23:08 schultzdavid

Relevant Forgejo issue: https://codeberg.org/forgejo/forgejo/issues/4052

mooseyboots avatar Aug 05 '25 08:08 mooseyboots