Only allowing signup via OpenID does not work #9991

Closed
opened 2025-11-02 08:55:09 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @xeruf on GitHub (Dec 19, 2022).

Description

See also https://github.com/go-gitea/gitea/issues/22164

I have the following in app.ini:

[service]
DISABLE_REGISTRATION        = true

[openid]
ENABLE_OPENID_SIGNUP = true

Expecting that username/password signup is prohibited while OpenID is allowed.

But I get this message upon OpenID signup:

Registration is disabled. Please contact your site administrator.

Gitea Version

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

No response

How are you running Gitea?

Helm Chart

Database

PostgreSQL

Originally created by @xeruf on GitHub (Dec 19, 2022). ### Description See also https://github.com/go-gitea/gitea/issues/22164 I have the following in app.ini: ```ini [service] DISABLE_REGISTRATION = true [openid] ENABLE_OPENID_SIGNUP = true ``` Expecting that username/password signup is prohibited while OpenID is allowed. But I get this message upon OpenID signup: > Registration is disabled. Please contact your site administrator. ### Gitea Version 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 _No response_ ### How are you running Gitea? Helm Chart ### Database PostgreSQL
GiteaMirror added the issue/needs-feedbacktype/bug labels 2025-11-02 08:55:09 -06:00
Author
Owner

@strk commented on GitHub (Dec 26, 2022):

I'm pretty sure this used to work but registration needs be open as first openid-based login MUST result in a local registration, basically. I can't remember by which switch but it should be possible to forbid local-only registration and enable the openid one. There might be an openid specific ALLOW_REGISTRATION variable (or there was)

@strk commented on GitHub (Dec 26, 2022): I'm pretty sure this used to work but registration needs be open as first openid-based login MUST result in a local registration, basically. I can't remember by which switch but it should be possible to forbid local-only registration and enable the openid one. There might be an openid specific ALLOW_REGISTRATION variable (or there was)
Author
Owner

@strk commented on GitHub (Dec 26, 2022):

Must be ENABLE_OPENID_SIGNUP = true, is that set to true as well ?

@strk commented on GitHub (Dec 26, 2022): Must be `ENABLE_OPENID_SIGNUP = true`, is that set to true as well ?
Author
Owner

@jrjake commented on GitHub (Dec 27, 2022):

I think you are thinking of ALLOW_ONLY_EXTERNAL_REGISTRATION. What happens if you use these settings instead?

[service]
ALLOW_ONLY_EXTERNAL_REGISTRATION=true

[openid]
ENABLE_OPENID_SIGNUP=true
@jrjake commented on GitHub (Dec 27, 2022): I think you are thinking of `ALLOW_ONLY_EXTERNAL_REGISTRATION`. What happens if you use these settings instead? ``` [service] ALLOW_ONLY_EXTERNAL_REGISTRATION=true [openid] ENABLE_OPENID_SIGNUP=true ```
Author
Owner

@xeruf commented on GitHub (Feb 6, 2023):

Thank you, that's it :)

@xeruf commented on GitHub (Feb 6, 2023): Thank you, that's it :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9991