mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
feat: add dedicated sign-up config for oauth (#13610)
Currently, it is only possible to disable all registrations. However, it would be helpful if you could disable normal registration but enable OAuth registration. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a setting to enable/disable new user signups via OAuth (default: enabled). * Admin Settings (Authentication) now includes a toggle for OAuth signups. * OAuth signup flow now respects this setting, preventing new registrations via OAuth when disabled. * Self-hosted configuration schema updated to include the new option. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Hudint Finn Weigand <dev@hudint.de> Co-authored-by: DarkSky <darksky2048@gmail.com> Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
This commit is contained in:
@@ -63,6 +63,10 @@
|
||||
"type": "Boolean",
|
||||
"desc": "Whether allow new registrations."
|
||||
},
|
||||
"allowSignupForOauth": {
|
||||
"type": "Boolean",
|
||||
"desc": "Whether allow new registrations via configured oauth."
|
||||
},
|
||||
"requireEmailDomainVerification": {
|
||||
"type": "Boolean",
|
||||
"desc": "Whether require email domain record verification before accessing restricted resources."
|
||||
|
||||
@@ -55,6 +55,7 @@ export const KNOWN_CONFIG_GROUPS = [
|
||||
module: 'auth',
|
||||
fields: [
|
||||
'allowSignup',
|
||||
'allowSignupForOauth',
|
||||
// nested json object
|
||||
{
|
||||
key: 'passwordRequirements',
|
||||
|
||||
Reference in New Issue
Block a user