# Oauth automatic account linking not working

**URL:** <https://forum.gitea.com/t/oauth-automatic-account-linking-not-working/5591>\
**Category:** Install/Maintain/Configure\
**Created:** [July 28, 2022, 7:20am UTC](https://forum.gitea.com/t/oauth-automatic-account-linking-not-working/5591 "2022-07-28T07:20:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![xoxys](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/xoxys/32/2855_2.png) [@xoxys](https://forum.gitea.com/u/xoxys)\
**Post date:** [July 28, 2022, 7:20am UTC](https://forum.gitea.com/t/oauth-automatic-account-linking-not-working/5591/1 "2022-07-28T07:20:05Z")

</div>

Hi, what’s the secret to get `ACCOUNT_LINKING = auto` working for oauth2 clients?

We use LDAP auth on our gitea instance right now and we try to make OIDC mandatory, therefor we disabled `Authentication source is Activated` in the LDAP auth source and set `ACCOUNT_LINKING = auto` in the `[oauth2_client]` config, but users still end up on the `Sign In to Authorize Linked Account ` dialog which is not working because the LDAP auth source is disabled

---

<div class="post-metadata">

**Author:** ![spijker](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/spijker/32/3238_2.png) [@spijker](https://forum.gitea.com/u/spijker)\
**Post date:** [November 21, 2022, 9:39am UTC](https://forum.gitea.com/t/oauth-automatic-account-linking-not-working/5591/2 "2022-11-21T09:39:04Z")

</div>

Hi , We have the same problem.  
Did you found a solution ?

---

<div class="post-metadata">

**Author:** ![xoxys](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/xoxys/32/2855_2.png) [@xoxys](https://forum.gitea.com/u/xoxys)\
**Post date:** [November 21, 2022, 9:55am UTC](https://forum.gitea.com/t/oauth-automatic-account-linking-not-working/5591/3 "2022-11-21T09:55:32Z")

</div>

Unfortunately no, we have re-enabled the LDAP auth source and use OIDC only as a comfort feature for now, even if this is not optimal.

---

<div class="post-metadata">

**Author:** ![nanuit](https://avatars.discourse-cdn.com/v4/letter/n/c77e96/32.png) [@nanuit](https://forum.gitea.com/u/nanuit)\
**Post date:** [September 1, 2023, 10:39am UTC](https://forum.gitea.com/t/oauth-automatic-account-linking-not-working/5591/4 "2023-09-01T10:39:02Z")

</div>

Is there a chance that the issue will be fixed?  
It reenders the Usage of Gitea as OAuth2 Client useless
