Fediverse 3rdparty Login Code
If you are looking for third-party sign-on for Fediverse, pronouns.cc has support for Mastodon and Misskey. Implementations supporting Mastodon API or forks of Misskey are supported as well.
Repo: https://codeberg.org/pronounscc/pronouns.cc
At the time of writing, relevant code can be found in those files in the repo:
backends/db/fediverse.go
routes/v1/auth/fediverse.go
routes/v1/auth/fedi_misskey.go