Skip to content

Commit b590f5f

Browse files
fix(auth): expose domainMatching and autoCreate in public config endpoint
Move domainMatching and autoCreate from authenticated-only to base organizations config so the frontend can access them without a session.
1 parent cfac0c7 commit b590f5f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

modules/auth/controllers/auth.controller.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,8 @@ const getConfig = (req, res) => {
382382
},
383383
organizations: {
384384
enabled: !!config.organizations?.enabled,
385+
domainMatching: !!config.organizations?.domainMatching,
386+
autoCreate: !!config.organizations?.autoCreate,
385387
},
386388
mail: {
387389
configured: isMailerConfigured(),
@@ -392,8 +394,6 @@ const getConfig = (req, res) => {
392394
if (req.user) {
393395
data.organizations = {
394396
...data.organizations,
395-
autoCreate: !!config.organizations?.autoCreate,
396-
domainMatching: !!config.organizations?.domainMatching,
397397
roles: config.organizations?.roles || [],
398398
roleDescriptions: config.organizations?.roleDescriptions || {},
399399
};

0 commit comments

Comments
 (0)