mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2026-03-10 15:52:40 -05:00
OIDC using Authentik leading to 500 error #38
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @requ1Re on GitHub (Aug 11, 2025).
Originally assigned to: @arunavo4 on GitHub.
Hi, I am trying to configure authentik as my External Identity Provider but I am always met with an error.
I have set it up using the usual values. When I click on "Sign in with [...]" on the "SSO" Tab of the login page, I get redirected to Authentik as expected, but when I confirm the login and get redirected back, I am met with a 500 Internal Server Error. The log shows the following error:
I have tried to set this up multiple times but I didn't manage to do it.
Any help would be appreciated, thank you!
@arunavo4 commented on GitHub (Aug 12, 2025):
@requ1Re please put your docker compose and the urls you have setup along minus the creds.
@requ1Re commented on GitHub (Aug 15, 2025):
Hi, I am not using docker-compose but running the docker image directly using docker run. Other than SSO, everything else is working as expected.
I have set
BETTER_AUTH_URLto the URL of the application. I have also tried with and without a trailing slash.This is the configuration within the application:

@bxm156 commented on GitHub (Aug 19, 2025):
I'm receiving the same error when trying to setup Authenitk. I used the Proxmox VE Script to install gitea-mirror
@hllshiro commented on GitHub (Aug 26, 2025):
I used the docker-compose.yml and .env provided by the repository and encountered the same error.
@arunavo4 commented on GitHub (Aug 28, 2025):
Thanks for reporting this. Will test and fix this issue
@hllshiro commented on GitHub (Sep 3, 2025):
v3.5.0 has an update "Updates to auth url", is that related to this issue? I tested v3.5.1, the issue is still there.
@arunavo4 commented on GitHub (Sep 3, 2025):
Yea it's a partial fix, I will make a proper fix and test it this week and update here. Thank you for testing it.
@arunavo4 commented on GitHub (Oct 22, 2025):
@bxm156 @requ1Re @hllshiro please try the new
v3.8.7the better-auth library that was being used have solved some of the issues that was holding this off. Once you test it and let me know if it works now.@hllshiro commented on GitHub (Oct 23, 2025):
I am currently out of town. I just remotely updated the container and conducted a simple test: it seems the issue still persists, and the error message is the same as before.
The configuration I'm using is consistent with the previous one, which is listed above. Could you please check if there is any error in the configuration? Additionally, I'm using Nginx Proxy Manager for reverse proxy, and the advanced configuration is as shown below:
@arunavo4 commented on GitHub (Oct 23, 2025):
@hllshiro thanks for sharing I will have to try and replicate this. Else I think it will be better if I can do a docker-compose with authentik and then share a guide with it. that way everyone can have a starting point that works.
@arunavo4 commented on GitHub (Oct 26, 2025):
@hllshiro recently this issue #134 poped up and we were able to get it to work with authentik in
v3.8.10after a few updates. Give it a try once and see if it solves your issue.Also, if possible do a fresh install.
@arunavo4 commented on GitHub (Oct 26, 2025):
@bxm156 @requ1Re @hllshiro This has been finally fixed in
v3.8.10but you need to wipe your existing Authentik provider (create a new provider with a freshproviderId) and add it again on v3.8.10 on a fresh install using Discover so the normalized config (with token endpoint) gets stored. confirmed in #122 and #134
@hllshiro commented on GitHub (Oct 29, 2025):
I just updated to v3.8.10 and followed the instructions, removed the old configured oidc and re-added, and now I get another error