(This is a meta topic. About this forum, the Discourse instance forum.gitlab.com.)
GitLab Forum allows to log in with GitLab and GitHub social login. Years ago, I originally logged in with GitHub (I believe, before the GitLab option was added) and now it seems impossible to use the same Discourse account with the GitLab login, in addition.
When I log in with the GitLab option Discourse tries to create a new account.
The create account dialog even displays my existing e-mail address, saying it is already taken.
In User - Preferences - Account there doesn’t seem to be a way to add another service next to the already attached GitHub one.
Can someone who maintains this instance configure Discourse in a way that both GitHub and GitLab can be used for a single forum account?
Attempting to login with an option that hasn’t been used previously will always mean it will attempt to create a new account, it’s normal behaviour of Discourse. It would require an option to be enabled under User Preferences to add the account to the existing profile. Only then would Discourse know that it belongs to an existing account, since the original account was created using Github. It would be the same in reverse if it was created on Gitlab, and then attempting to do the same logging in with Github.
It would require someone from the @gitlab-team to take a look at it and see if it’s possible. In a default installation of Discourse, only Github is an option, so I expect some customising has been done to add Gitlab as an oauth option for logging in (in the same way that Github is oauth). Whether that makes a difference for making something visible in the user preferences though, I’ve no idea and may affect the ability for them to upgrade the forum, so would mean them forking and maintaining their additional changes to make such an option available.
Let’s see what Gitlab say in response to your post.
It mentions that the implementation asks for the creation of a new user in any case. If the e-mail address matches it should be possible to match the login with an existing account – that’s the point.
The GitLab Discourse plugin needs some love. I have created a specific issue for the topic:
True yes, but you would have to already be logged in to attach it to an existing account. If the plugin allowed that without being authenticated, anyone could gain control of your account pretending to be you. And that would be far worse than the current situation. Or at least ask you to authenticate with the account that already exists to prove ownership before attaching to an existing account when not already logged in.