# Linking Gitea Accounts

**URL:** <https://forum.gitea.com/t/linking-gitea-accounts/4001>\
**Category:** Federation\
**Created:** [October 27, 2021, 8:07pm UTC](https://forum.gitea.com/t/linking-gitea-accounts/4001 "2021-10-27T20:07:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dachary](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/dachary/32/4990_2.png) [@dachary](https://forum.gitea.com/u/dachary)\
**Post date:** [October 27, 2021, 8:07pm UTC](https://forum.gitea.com/t/linking-gitea-accounts/4001/1 "2021-10-27T20:07:46Z")

</div>

Bonjour,

Today’s Codeberg newsletter has something related to linking Gitea accounts to external accounts (GitHub or GitLab). I’m curious to know if this is still a [Codeberg specific feature](https://codeberg.org/Codeberg/gitea) or something that already landed in Gitea. My interest is mostly because it is something [federation features](https://github.com/go-gitea/gitea/labels/theme%2Ffederation#) needs.

Cheers

> OAuth linking: Migration from other services to Gitea is already a nice and convenient feature for a long time. However, previous comments were not assigned to the original author. Now, you can link your GitHub and [GitLab.com](http://GitLab.com) profiles to Codeberg and migrated content links to your Codeberg profile and login to Codeberg using those providers once linked. This feature is of course fully optional, please be aware that the third-party providers will learn about your linking and login attempts if you use the quick login feature. Here is how it works:
> 
> - Register a Codeberg account as usual (not necessary as you have it)
> - click on “Link Account” at the sign in page
> - choose a third-party provider and authorize Codeberg (you will share data with them)
> - migrated content now links to your profile
> - you can also use these to login to Codeberg if this is more convenient for you, but they’ll learn about your logins then.

---

<div class="post-metadata">

**Author:** ![dachary](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/dachary/32/4990_2.png) [@dachary](https://forum.gitea.com/u/dachary)\
**Post date:** [November 15, 2021, 12:36pm UTC](https://forum.gitea.com/t/linking-gitea-accounts/4001/2 "2021-11-15T12:36:58Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/gitea/original/2X/2/2e5db71b9384d777b83afc3c2f882f24ef824d55.png)

 ![image](https://us1.discourse-cdn.com/flex020/uploads/gitea/original/2X/1/1e9d9982bd5f91852d3b52c91937fade46eec462.png)

 ![image](https://us1.discourse-cdn.com/flex020/uploads/gitea/original/2X/a/a35f5e61e0437a5d6a7f8eed14babf8312991692.png)

 ![image](https://us1.discourse-cdn.com/flex020/uploads/gitea/original/2X/b/b67596f70ee0ae2bb36dfee9dfee59c2a541c225.png)

---

<div class="post-metadata">

**Author:** ![dachary](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/dachary/32/4990_2.png) [@dachary](https://forum.gitea.com/u/dachary)\
**Post date:** [November 15, 2021, 1:20pm UTC](https://forum.gitea.com/t/linking-gitea-accounts/4001/3 "2021-11-15T13:20:24Z")

</div>

> [@dachary](#):
>
> I’m curious to know if this is still a [Codeberg specific feature](https://codeberg.org/Codeberg/gitea) or something that already landed in Gitea.

It is already available and working, although [not documented](https://docs.gitea.io/en-us/authentication/). The **Authentication Sources** tab of the **Admin** page has a **OAuth2** menu entry.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/gitea/original/2X/9/9dd19bacfa2c10264a40f47fb6c23a1079899e0c.png)

It can be used to setup a GitLab provider:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/gitea/original/2X/f/f90fe12b05187faf19ff118a3ed9f2ff088fe4bc.png)

And it will show on the login page:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/gitea/original/2X/5/53d71243372b1f43c526b290e8b19646934f6633.png)

---

<div class="post-metadata">

**Author:** ![dachary](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/dachary/32/4990_2.png) [@dachary](https://forum.gitea.com/u/dachary)\
**Post date:** [November 15, 2021, 8:40pm UTC](https://forum.gitea.com/t/linking-gitea-accounts/4001/4 "2021-11-15T20:40:33Z")

</div>

> [@dachary](#):
>
> Today’s Codeberg newsletter has something related to linking Gitea accounts to external accounts (GitHub or GitLab).

It looks like the mapping between external id and Gitea id has been around [since 2019](https://github.com/go-gitea/gitea/commit/e3e44a59d01da3af2be3a830f4a90394e7af4ff4#diff-e3c9629791cc752774a042327566d886d8ec09fd29acb7829a5dbf433d740a4aR90-R140) which makes me wonder why Codeberg announced it. I probably missed something…
