oauth2 login disabled if registration is disabled #1180

Closed
opened 2025-11-02 03:51:33 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @yannick on GitHub (Oct 23, 2017).

  • Gitea version (or commit ref):

  • Git version: 1.1.0+655-ga257f88a built with: bindata, sqlite

  • Operating system: macOS

  • Database (use [x]):

    • [ x] SQLite
  • Can you reproduce the bug at https://try.gitea.io:

    • Yes (provide example URL)
    • No
    • Not relevant

Description

when i disable registration in config i am not able to login via oauth providers unless the user registerd before.

it should be possible to disable manual registration and only allow oauth2 providers to login/register
also it should be possible to limit e.g. google oauth logins to specific domains only

Originally created by @yannick on GitHub (Oct 23, 2017). - Gitea version (or commit ref): - Git version: 1.1.0+655-ga257f88a built with: bindata, sqlite - Operating system: macOS - Database (use `[x]`): - [ x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant ## Description when i disable registration in config i am not able to login via oauth providers unless the user registerd before. it should be possible to disable manual registration and only allow oauth2 providers to login/register also it should be possible to limit e.g. google oauth logins to specific domains only
GiteaMirror added the type/feature label 2025-11-02 03:51:33 -06:00
Author
Owner

@gabrielsieben commented on GitHub (Nov 6, 2017):

Yes, I really want this. I would love if I could use an OAuth Provider (Auth0.com in this case), and turn off the regular login form, allowing only people who sign in successfully through OAuth to register. 👍

@gabrielsieben commented on GitHub (Nov 6, 2017): Yes, I really want this. I would love if I could use an OAuth Provider (Auth0.com in this case), and turn off the regular login form, allowing only people who sign in successfully through OAuth to register. :+1:
Author
Owner

@gabrielsieben commented on GitHub (Nov 6, 2017):

In the settings, there are settings for:

  • Disabling Registration
  • Enabling OpenID Login
  • Enabling OpenID Registration

Obviously, the OAuth thing (when added as an "Authentication" doesn't use the OpenID values). In my opinion, we should have an additional setting, in the Authentication settings, which overrides the "Disable Registration" option specifically for that authentication.

@gabrielsieben commented on GitHub (Nov 6, 2017): In the settings, there are settings for: - Disabling Registration - Enabling OpenID Login - Enabling OpenID Registration Obviously, the OAuth thing (when added as an "Authentication" doesn't use the OpenID values). In my opinion, we should have an additional setting, in the Authentication settings, which overrides the "Disable Registration" option specifically for that authentication.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1180