File tree Expand file tree Collapse file tree 5 files changed +18
-3
lines changed Expand file tree Collapse file tree 5 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 148
148
"description" : " Whether allow new registrations.\n @default true" ,
149
149
"default" : true
150
150
},
151
+ "allowSignupForOauth" : {
152
+ "type" : " boolean" ,
153
+ "description" : " Whether allow new registrations via configured oauth.\n @default true" ,
154
+ "default" : true
155
+ },
151
156
"requireEmailDomainVerification" : {
152
157
"type" : " boolean" ,
153
158
"description" : " Whether require email domain record verification before accessing restricted resources.\n @default false" ,
1123
1128
}
1124
1129
}
1125
1130
}
1126
- }
1131
+ }
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ export interface AuthConfig {
8
8
ttr : number ;
9
9
} ;
10
10
allowSignup : boolean ;
11
+ allowSignupForOauth : boolean ;
11
12
requireEmailDomainVerification : boolean ;
12
13
requireEmailVerification : boolean ;
13
14
passwordRequirements : ConfigItem < {
@@ -27,6 +28,10 @@ defineModuleConfig('auth', {
27
28
desc : 'Whether allow new registrations.' ,
28
29
default : true ,
29
30
} ,
31
+ allowSignupForOauth : {
32
+ desc : 'Whether allow new registrations via configured oauth.' ,
33
+ default : true ,
34
+ } ,
30
35
requireEmailDomainVerification : {
31
36
desc : 'Whether require email domain record verification before accessing restricted resources.' ,
32
37
default : false ,
Original file line number Diff line number Diff line change @@ -224,7 +224,7 @@ export class OAuthController {
224
224
return connectedAccount . user ;
225
225
}
226
226
227
- if ( ! this . config . auth . allowSignup ) {
227
+ if ( ! this . config . auth . allowSignupForOauth ) {
228
228
throw new SignUpForbidden ( ) ;
229
229
}
230
230
Original file line number Diff line number Diff line change 63
63
"type" : " Boolean" ,
64
64
"desc" : " Whether allow new registrations."
65
65
},
66
+ "allowSignupForOauth" : {
67
+ "type" : " Boolean" ,
68
+ "desc" : " Whether allow new registrations via configured oauth."
69
+ },
66
70
"requireEmailDomainVerification" : {
67
71
"type" : " Boolean" ,
68
72
"desc" : " Whether require email domain record verification before accessing restricted resources."
407
411
"desc" : " Allowed origin"
408
412
}
409
413
}
410
- }
414
+ }
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ export const KNOWN_CONFIG_GROUPS = [
55
55
module : 'auth' ,
56
56
fields : [
57
57
'allowSignup' ,
58
+ 'allowSignupForOauth' ,
58
59
// nested json object
59
60
{
60
61
key : 'passwordRequirements' ,
You can’t perform that action at this time.
0 commit comments