go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44.91k stars 5.48k forks source link

Support itch.io OAuth2 provider #31016

Open murl-digital opened 5 months ago

murl-digital commented 5 months ago

Feature Description

itch.io provides an OAuth2 provider that I'd like to use on my gitea instance, see the docs here: link

It seems the closest I can do is use OIDC, but it requires a discovery URL that itch.io doesn't have. Is there a way to do this that I don't know about?

Screenshots

No response

KN4CK3R commented 5 months ago

I don't see think itch.io is a OAuth2 provider. They just support that as authentication for their api?

murl-digital commented 5 months ago

They have a profile endpoint in the docs, so kind of like discord, you can use it as an auth source: link

techknowlogick commented 5 months ago

Here are the docs for the oauth provider: https://itch.io/docs/api/oauth

I've tagged this issue as "upstream" as we use goth for working with external oauth providers, and so itch.io support will need to be added there first.

murl-digital commented 5 months ago

Should I go upstream and open a request myself?

techknowlogick commented 5 months ago

@murl-digital if you can open one, that would be appreciated, but if not, that's okay, as I'm a maintainer over there, and I am looking into this now. It looks like itch.io doesn't return the user's email, so it might not be feasible to implement it in Gitea (Git and Gitea rely on email addresses and might have unexpected behaviours without one).

murl-digital commented 5 months ago

(Git and Gitea rely on email addresses and might have unexpected behaviours without one).

For my usecase, at least, I want to give people who bought my software an easy way to make an account and report bugs, and since I handle everything through itch, it kind of just makes sense, and I'm not too worried about email addresses. It seems that profiles have a unique ID, and you can maybe associate it that way? I know that if you set up, say, a GitHub integration, you have the option of signing in to an account or making a new one.

edit: clarity and afterthought