mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2026-04-25 23:35:52 +03:00
[GH-ISSUE #134] Issuer mismatch with authentik #67
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#67
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 @ngregrichardson on GitHub (Oct 26, 2025).
Original GitHub issue: https://github.com/RayLabsHQ/gitea-mirror/issues/134
Originally assigned to: @arunavo4 on GitHub.
I am trying to set up SSO with authentik and hitting an issue. I believe is is different than #73, but please feel free to close this if it is related.
gitea-mirror properly redirects me to authentik for login, but when authentik sends me back, it gives me an "issuer mismatch" (e.g. redirected to https://gitsync.mydomain.tld/api/auth/error/error?error=invalid_provider&error_description=issuer_mismatch) . My thought is that the missing trailing slash is causing this, but whenever I add the slash and save the OIDC config, it removes it again.
Here is my EIP config:
My authentik issuer url:
My authentik redirect URI config:
I don't see any server-side errors at all. Let me know if there is any more info I can share to help debug this. Thanks!
@arunavo4 commented on GitHub (Oct 26, 2025):
Hi @ngregrichardson can you try this image
ghcr.io/raylabshq/gitea-mirror:pr-135from this PR #135 which disables the the trailing slash remover you suspected. check if that helps.@ngregrichardson commented on GitHub (Oct 26, 2025):
Hey, that does work! I appreciate the quick turnaround :D The only thing i'm wondering now (and this may be a dumb question) is how I'd link a user? I have an authentik user with the same email as the gitea mirror user, but I get a "not linked" error (e.g. /api/auth/error/error?error=account%20not%20linked)
@arunavo4 commented on GitHub (Oct 26, 2025):
@ngregrichardson Glad to hear the login works now! I just pushed an update that trusts the
email_verifiedclaim from your SSO provider. So as long as the Authentik user has the same email and Authentik reports it as verified, the account should auto link you don’t need to do anything else on the Gitea Mirror side. Try signing in again with that user after confirming the email is verified in Authentik.Use this image to test
docker pull ghcr.io/raylabshq/gitea-mirror:12488bb@arunavo4 commented on GitHub (Oct 26, 2025):
Also @ngregrichardson would appreciate your help on these issues #122 and #73 maybe you can just add what config worked for you. As I dont really use Authentik so I dont have much idea about the exact setup.
@ngregrichardson commented on GitHub (Oct 26, 2025):
Just tried
12488bband am getting a new error it seems. I still have the "unable to link account" but this time I get an actual error:@arunavo4 commented on GitHub (Oct 26, 2025):
@ngregrichardson so when we moved to better-auth we deleted from db columns, have added them back that should work now.
Try this
docker pull ghcr.io/raylabshq/gitea-mirror:574834d@ngregrichardson commented on GitHub (Oct 26, 2025):
🎉 works like a charm!!
@arunavo4 commented on GitHub (Oct 26, 2025):
@ngregrichardson Awesome.
@arunavo4 commented on GitHub (Oct 26, 2025):
@ngregrichardson Is it possible for you to contribute a small docker-compose file with both gitea-mirror and authentik in it and then have a small readme on how to set it up. I think that would be a great baseline for a working setup for people looking for OIDC with authentik.
you can PR on this repo on a dir just like the kube helm chart. and update the main readme to point to it. This contribution will be much appreciated.
@ngregrichardson commented on GitHub (Oct 26, 2025):
So unfortunately (as far as I'm aware, at least) authentik is mainly a "GUI configuration" type app. It has a lot of complex configs, so I don't think it'd be easily distillable into a single docker-compose.yml. I'd be happy to make a docs PR with an authentik section in the OIDC part (and I can include authentik screenshots there too?)
@arunavo4 commented on GitHub (Oct 26, 2025):
@ngregrichardson Yes that will be aweome if you can do screnshots and detailed steps what you did. and make a sepeetre readme for it and then we can take off the small OIDC section in main readme and refer your readme. Other wise the main readme. is too long right now. I wish to clean it up. too much info.