mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2026-04-25 07:15:57 +03:00
[GH-ISSUE #122] Crash after setting up SSO #59
Labels
No labels
bug
documentation
enhancement
help wanted
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/gitea-mirror#59
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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 @CrazyWolf13 on GitHub (Oct 22, 2025).
Original GitHub issue: https://github.com/RayLabsHQ/gitea-mirror/issues/122
Originally assigned to: @arunavo4 on GitHub.
Hi @arunavo4
I set up SSO via authentik today.
After doing so and saving it all seemed fine, but after clicking logout, it showed an message at the bottom right that there is a JSON error but not the actual error, then it was like the gitea-mirror UI, but not with any data, and I didn't get redirected to loginpage.
After that the application responded with Code 500 Internal Server Error and this log:
EDIT: I could not find any other relevant error in the log, accoring to the log everything should work fine.
I couldn't even get to a login page and a state where I could sign in with authentik, so this problem is purely on gitea-mirror side.
Also I saw you are using IDs for user, is it possible to map an existing user to an OIDC user?
can I just change the user ID via the DB, or do you plan on adding this feature?
@arunavo4 commented on GitHub (Oct 22, 2025):
@CrazyWolf13 did you try this PR #96
@CrazyWolf13 commented on GitHub (Oct 22, 2025):
my bad, still had reverse_proxy auth enabled on my reverse proxy.
500 Error is gone, but I'm getting this:
@arunavo4 commented on GitHub (Oct 22, 2025):
@CrazyWolf13 is this on the main branch or the PR #96
@CrazyWolf13 commented on GitHub (Oct 22, 2025):
@arunavo4 main branch.
If I shall test the PR, I'd be happy to do so, but then a tagged release would be awesome, so I can test it :)
@arunavo4 commented on GitHub (Oct 22, 2025):
@CrazyWolf13 let me make one for you
@arunavo4 commented on GitHub (Oct 22, 2025):
@CrazyWolf13 this should work https://github.com/RayLabsHQ/gitea-mirror/releases/tag/v3-sso since you need source files right?
@arunavo4 commented on GitHub (Oct 22, 2025):
@CrazyWolf13 also was there anything from docker logs>? on main branch anything useful?
@CrazyWolf13 commented on GitHub (Oct 22, 2025):
@arunavo4 I'm not using docker, I'm the proxmox guy :D
Yes, with the new branch deployed I can see this:
did you setup your env vars properly?
@CrazyWolf13 commented on GitHub (Oct 22, 2025):
@arunavo4
Yes I think so, otherwise let me know.
@arunavo4 commented on GitHub (Oct 22, 2025):
@CrazyWolf13 can you try the
v3.8.7version look like better-auth have fixed some of the issues with sso that was blocking in their new beta release.@arunavo4 commented on GitHub (Oct 26, 2025):
@CrazyWolf13 can you share a screenshot of your OIDC config, you can redact domain. also is your authentik in
httporhttps?@CrazyWolf13 commented on GitHub (Oct 26, 2025):
@arunavo4 authentik is https via nginxreverseproxymanager.
sure:
@arunavo4 commented on GitHub (Oct 26, 2025):
Weird in #134 @ngregrichardson seems to have worked it out, might be the way authetik is configured. Hoping he can provide some help regarding how he is using authentik setup.
@arunavo4 commented on GitHub (Oct 26, 2025):
@CrazyWolf13 and is gitea mirror also running behind the proxy? with https?
@CrazyWolf13 commented on GitHub (Oct 26, 2025):
@arunavo4 yes.
Tbh. authentik doesn't really have a config, you tell it just you want a new OIDC Provider with app and select implicit or explicit, that's it.
My Reverse Proxy is on defaults, so that should work.
This is the code I get on SSO:
Mine is also not an issuer mismatch, a different issue:
@ngregrichardson commented on GitHub (Oct 26, 2025):
My setup wasn't noticeably different than any other authentik OIDC setup --
I started this with latest build, then @arunavo4 made some changes to fix some issues regarding trailing slashes, etc. so as of now I'm not on the latest tag. I'm running this on Unraid v7.1.4 so I don't have much help in terms of proxmox unfortunately.
@CrazyWolf13 commented on GitHub (Oct 26, 2025):
@ngregrichardson Thanks for the steps, yeah I've done it the same way like you and what I've done countless times already in my Homelab.
the SSO flow per se works fine, as I click on login on the gitea-mirror UI, get redirected to authentik, it creates the redirect or I have to login, then back on gitea-mirror there is this Internal Server Error 500.
As my reverse Proxy (nginxproxymanager) is left on all defaults e.g. no custom config, I think this is an issue of gitea-mirror.
@CrazyWolf13 commented on GitHub (Oct 26, 2025):
@arunavo4 were you able to replicate the issue or did it work fine for you with authentik?
@arunavo4 commented on GitHub (Oct 26, 2025):
Not yet, But will try and set it up on docker compose and see if I can get it to work.
@arunavo4 commented on GitHub (Oct 26, 2025):
@CrazyWolf13 please try
v3.8.10as in this issue #134 we were able to get it to work with authentik.@CrazyWolf13 commented on GitHub (Oct 26, 2025):
@arunavo4 same issue as before.
@CrazyWolf13 commented on GitHub (Oct 26, 2025):
@arunavo4
I also tried with this nginxproxymanager config, but the issue persists:
Here the log:
my config again:
@arunavo4 commented on GitHub (Oct 26, 2025):
@CrazyWolf13 so you are accessing it from
https://gitea-mirror.redacted.devright? or fromhttp://10.10.20.45:4321?@CrazyWolf13 commented on GitHub (Oct 26, 2025):
@arunavo4 via domain, locally through the IP is only in spcacial circumstances to fix /debug things, but there I don't mind SSO not working.
@arunavo4 commented on GitHub (Oct 26, 2025):
@CrazyWolf13 can you wipe your existing Authentik provider (create a new provider with a fresh
providerId) and add it again on
v3.8.10on a fresh install using Discover so the normalized config (with token endpoint) gets stored.@CrazyWolf13 commented on GitHub (Oct 26, 2025):
@arunavo4 wow, that actually fixed it, recreating the provider in gitea-mirror only was sufficient.
Thanks a lot!
@arunavo4 commented on GitHub (Oct 26, 2025):
@CrazyWolf13 awesome I will update some of the methods so that this will be a warning for users using older versions. and will link all these issues in readme if people get these issues.