I think IndieAuth makes a lot of sense as the way to implement a federated login protocol to provide a "simpler UX for OAuth2" login for Gitea as this issue is named.
It would also be possible to provide support for the "with GitHub" portion (as originally noted in the issue) without having to ask / wait for GitHub to implement IndieAuth, by adding https://indieweb.org/RelMeAuth support.
https://indielogin.com/ is an example of an open source service that supports both of those, IndieAuth as github.com/aaronpk suggested and RelMeAuth, and is in daily use by folks signing-into the IndieWeb.org site.