# Hardcoded Authentication Sources

**URL:** <https://forum.gitea.com/t/hardcoded-authentication-sources/5475>\
**Category:** Install/Maintain/Configure\
**Created:** [July 10, 2022, 2:35pm UTC](https://forum.gitea.com/t/hardcoded-authentication-sources/5475 "2022-07-10T14:35:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SamTherapy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/samtherapy/32/2804_2.png) [@SamTherapy](https://forum.gitea.com/u/SamTherapy)\
**Post date:** [July 10, 2022, 2:35pm UTC](https://forum.gitea.com/t/hardcoded-authentication-sources/5475/1 "2022-07-10T14:35:15Z")

</div>

Hello,

I used the Mastodon application source to allow users of my Pleroma instance to log into gitea, and it used to work fine.

However, I recently migrated my instance to a new device and noticed that that login method no longer worked. I suspect that Gitea caches the old IP and was wondering if it could be changed.

Here are the (somewhat) relevant logs:

```auto
router: completed GET /user/login?redirect_to=[callback link] for 127.0.0.1:36338, 200 OK in 9.4ms @ auth/auth.go:149(auth.SignIn)
router: completed GET /user/oauth2/pleroma for [::1]:42190, 307 Temporary Redirect in 4.4ms @ auth/oauth.go:774(auth.SignInOAuth)
...rs/web/auth/oauth.go:845:SignInOAuthCallback() [E] [62cae1ad] UserSignIn: oauth2: cannot fetch token: 502 Bad Gateway
[nginx 502]
router: completed GET /user/oauth2/pleroma/callback?code=G8SjjZ64I3EfAWTAMGjvhWc2i_KhleyohsT8FwEZv5s&state=1e0df849-80f4-4c2a-adbf-f823fa9d63f2 for 127.0.0.1:36444, 500 Internal Server Error in 523.4ms @ auth/oauth.go:808(auth.SignInOAuthCallback)

```

---

<div class="post-metadata">

**Author:** ![SamTherapy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/samtherapy/32/2804_2.png) [@SamTherapy](https://forum.gitea.com/u/SamTherapy)\
**Post date:** [July 10, 2022, 2:52pm UTC](https://forum.gitea.com/t/hardcoded-authentication-sources/5475/2 "2022-07-10T14:52:04Z")

</div>

I made a new application source pointing to the same instance and it failed for the same reason. I’ve been going through the database but can’t find anything
