-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
500 error on github OAuth2 login #1012
Comments
Possibly worth noting that in the setup wizard thing I created the instance with account registration disabled, but then enabled it after my first OAuth2 login failed with the 500, figuring that might be the cause. |
Did you test another PR before, which may have updated your database "version"
table ? That's what migration are based on...
Hint: try with a fresh database
|
Yes, this is a 100% clean build, with a fresh database. AFAICT the problem is that ExternalLoginUser was added to migrations, but wasn't added to the module init in models/models.go. At least, with this diff on master it's fixed, and I can log in:
Happy to work that up as a PR if you like, but it'd take me a bit to get a proper fork set up to generate the PR against, etc. Also it looks like @willemvd has another PR in flight, so assuming this is the correct fix, might be simplest to just include it in there. |
Good catch ! Does that then only happen on new installs ?
Please send the PR, it'll be needed anyway as nobody can
push directly to master...
|
This is for @willemvd, btw
|
It happened to me on a new install, but I don't have an existing install to test against. |
Will test it against a clean setup tomorrow (+- 9 hours from now :) ) and provide a PR if required like you suggested (will also have a look to fix #1015 in that same PR) |
Btw , try.gitea.io is upgraded and configured against Github, so existing install is working ;) |
@morrildl I think you are right, please send a PR |
I've been tracking #679 and #26 and this morning I figured I'd give it a try. Looks like a small oversight in DB creation on init.
I created the Github OAuth2 app scope, entered the keys, etc. From logs, the OAuth2 flow completed fine, but the result 500s with this in the log:
...and this in the UI in dev mode:
Looks like a database didn't get created on initialization. This is just an instance of the Dockerhub image last pushed a few hours ago.
The text was updated successfully, but these errors were encountered: