-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
http error 500 when trying to link accounts via oauth #19715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm getting http 500 as well with 1.16.8, just trying to log in with 2FA. |
I'm also having the same issue. Running gitea and authentik as oauth2 provider using latest official docker images. Currently this is gitea v1.17.0-rc1 and authentik 2022.6.3. When trying to login I end up with error 500 in the frontend and the following log entry:
|
I get the same issue too. |
Same issue too.
|
anyone resolved this ? |
Is it random or always? |
I might have found a solution.
But did you guys read the instructions when creating the oauths in the
admin dashboard?
Might work if you try to follow everything.
Comment for more help.
…On Monday, August 22, 2022, Lunny Xiao ***@***.***> wrote:
Is it random or always?
—
Reply to this email directly, view it on GitHub
<#19715 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUO62OHWKSIHARKURRJQG3DV2LXLRANCNFSM5V7IVDKQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
It might just be random
Although some guys might experience it always.
On Saturday, August 27, 2022, Dennis Sebalemba ***@***.***>
wrote:
… I might have found a solution.
But did you guys read the instructions when creating the oauths in the
admin dashboard?
Might work if you try to follow everything.
Comment for more help.
On Monday, August 22, 2022, Lunny Xiao ***@***.***> wrote:
> Is it random or always?
>
> —
> Reply to this email directly, view it on GitHub
> <#19715 (comment)
>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/
AUO62OHWKSIHARKURRJQG3DV2LXLRANCNFSM5V7IVDKQ>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
—
Reply to this email directly, view it on GitHub
<#19715 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUO62OE3VHUX5OGPBRK34VLV3JUULANCNFSM5V7IVDKQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Tested it again with fresh installs of 1.16.7 - 1.16.9 & 1.17.1 and now all versions just do fine. I guess it's really just either an random bug or some sort of miss-configuration. One thing I found out though is that you need to name the source "gitlab" when trying to use gitlab as oauth provider, otherwise it wont work for some reason. Also as a help for others: I noticed that some fields are not properly trimmed on save, but only when you edit it in the frontend. Save it again and the value is properly trimmed. (#21005) |
I think this is likely due to some timing issue in that the requests have been interleaved in some odd way. I'm just not sure how we'd go about chasing this problem down more clearly as it appears strangely intermittent and random which makes creating a test case almost impossible. |
Get a similar error when trying to connect our keycloak cluster with gitea. I can not even configure OAuth. I get directly an internal server error. Sadly without any meaningful error message. Maybe the access token does not have the right authorities? Which authorities does gitea (OAuth OpenID Connect) expect? Does gitea search for the URLs provided here: https://docs.gitea.io/en-us/oauth2-provider/ v: 1.17.2 running as a pod in k8s UPDATE: |
Ran into an error 500 while trying to configure gitea with authentik. Turns out I made a mistake in the slug in the auto discovery URL. Throwing an error 500 instead of say a 404 make you look for more serious problems. |
You actually need to name your OAuth login the same as the url. Scenarios: example: If it begins with "G" then the callback URL should have it in uppercase too: example: |
In most cases, it's caused by this problem: |
Description
Steps to reproduce:
gitlab
https://<your gitea domain>/user/oauth2/gitlab/callback
as allowed redirectAt first it will redirect correctly to gitlab, but when returning to gitea, the user is shown an error 500.
Log Output (Debug):
Gitea Version
1.16.7, 1.16.8
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
linux
How are you running Gitea?
Via the offical binary: https://docs.gitea.io/en-us/install-from-binary/
Database
MySQL
The text was updated successfully, but these errors were encountered: