-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Oauth2_client ENABLE_AUTO_REGISTRATION configuration #16826
Comments
PR which implements this code #5123 |
Have you added an oauth2 authentication source? |
Yes through https://git.mysite.com/admin/auths it works for year or smth, only if you manually link accounts through GUI. |
Ah I think this is a duplicate of #16831. Did you do a gitea dump from a version of gitea 1.14.3-1.14.6 and then restore? If so the problem is that the config of your local source has been broken - but this would also affect your repo units too. |
Hi, No it was just binaries upgrade. from 1.14.6 to 1.15.0. Should do dump / re-import for such upgrade? |
OK.
No you should not need to do. In fact if you had there would have been a problem.
The issue is that DISABLE_REGISTRATION is disabling the autoregistration. gitea/routers/web/user/auth.go Line 621 in ded438f
|
OK it is working, but need option smth like ALLOW_ONLY__OAUTH2_REGISTRATION, because now if I allow DISABLE_REGISTRATION = false, ALLOW_ONLY_EXTERNAL_REGISTRATION it is possible totally external users, from the same OAuth2 provider to register in my gitea.
For Oauth2 implementations on other products have smth like: |
Not exactly that, but it works:
|
Stale and out-dated The code has changed a lot |
-->
[x]
):HI,
I want to use only SSO/oauth2 from google for authentication: no gitea local accounts, no anonymous external users,
Only users in my google organization should be able to login AS WELL new users in my google organization should be able
auto sign-in to gitea.
I suppose [oauth2_client] ENABLE_AUTO_REGISTRATION is just for this purpose.
But it does not work. Maybe you have ideas?
My config:
[service]
REGISTER_EMAIL_CONFIRM = false
ENABLE_NOTIFY_MAIL = false
DISABLE_REGISTRATION = true
ALLOW_ONLY_EXTERNAL_REGISTRATION = false
ENABLE_CAPTCHA = false
REQUIRE_SIGNIN_VIEW = false
DEFAULT_KEEP_EMAIL_PRIVATE = false
DEFAULT_ALLOW_CREATE_ORGANIZATION = false
DEFAULT_ENABLE_TIMETRACKING = true
[oauth2_client]
ENABLE_AUTO_REGISTRATION = true
USERNAME = email
ACCOUNT_LINKING = auto
...
The text was updated successfully, but these errors were encountered: