Would it be possible to add also Gitea SSO integration to Mattermost like it has GitLab's?
Gitea from version 1.8.0 now also acts as OAuth provider so that should not be hard to add
Thanks, appreciate your feedback @lafriks.
Would you like to contribute this in the feature idea forum so it can be discussed, upvoted and considered for a help wanted ticket?
Please include a link back to this GitHub issue. If you're interested in implementing, please say so and we'll prioritize the review.
You get 10 votes in the feature idea forum, and each one influences the future of the project.
I'm Gitea developer so I would be willing to contribute if such idea is reviewed and accepted
Hi @lafriks, that's great to hear, here are instructions on how to get started: https://developers.mattermost.com/integrate/getting-started/.
I also posted a note for our team on our developer-toolkit channel that you are interested in working on this integration.
Thanks @lafriks for the suggestion, and for your willingness to contribute the feature.
The effort to properly support, test and document Gitea SSO--on web, desktop and mobile platforms--is non-trivial, so we would first like to measure how much interest there is within the Mattermost community to support such a feature.
As a next step, I would recommend starting a conversation in the feature idea forum as @amyblais suggested and see how much interest it gains.
We regularly monitor the feature idea forums, and work together with our community to release them.
Let me know if you have any questions?
Actually someone had already suggested this idea there: https://mattermost.uservoice.com/forums/306457-general/suggestions/37502962-add-gitea-oauth2-support
Hi @lafriks, awesome, thank you for upvoting the feature request,
The effort to properly support, test and document Gitea SSO--on web, desktop and mobile platforms--is non-trivial, so we would first like to measure how much interest there is within the Mattermost community to support such a feature.
This sound like a very good reason to replace the builtin gitlab integration with a generic one, instead of adding Gitea. Because it pretty much already exists! The only thing that makes it "gitlab" and not just "oauth" is that it's labelled "GitLab" in the UI (and uses authservice == 'gitlab'
in the users table).
Sure, it expects certain fields (id, username, email, name) to be present, but to make it truly generic all that's needed is a way to configure the mapping of which field contains what, and separate fields for the oauth authorize/token/api endpoints instead of just setting the base URL (internally there are already separate options for them and setting them in config.json works fine, they are just not directly editable in the system console).
Or allow delegating login handling to a plugin; that way there's no need to maintain any particular login method because whoever wants to use it can do that themselves.
@ThiefMaster I think you have the right idea. I don't know why mattermost has hardcoded oauth to GitLab. I would think it would make much more sense to be a little more flexible. Sure, it's easier on users to have everything taken care of, but there has got to be a better way.
I welcome this a lot and Gitea as well as Mattermost are written in Go, which does appear as a much made in heaven, since we can actually ship both in a package... :hugs:
@ShalokShalom If you would like to see this become reality, please vote on the suggestion in the mattermost forum: https://mattermost.uservoice.com/forums/306457-general/suggestions/37502962-add-gitea-oauth2-support
I agree.
I'm currently looking for deploying a self-hosted git service, but my dev team definitively want also mattermost integration, so that would lead me to choose gitlab, whereas I would go with gitea if I could.
Most helpful comment
This sound like a very good reason to replace the builtin gitlab integration with a generic one, instead of adding Gitea. Because it pretty much already exists! The only thing that makes it "gitlab" and not just "oauth" is that it's labelled "GitLab" in the UI (and uses
authservice == 'gitlab'
in the users table).Sure, it expects certain fields (id, username, email, name) to be present, but to make it truly generic all that's needed is a way to configure the mapping of which field contains what, and separate fields for the oauth authorize/token/api endpoints instead of just setting the base URL (internally there are already separate options for them and setting them in config.json works fine, they are just not directly editable in the system console).
Or allow delegating login handling to a plugin; that way there's no need to maintain any particular login method because whoever wants to use it can do that themselves.