(p, activePlugin)
| 2790 | }; |
| 2791 | |
| 2792 | const listAuthProfiles = (p, activePlugin) => { |
| 2793 | const d = getProfileDir(p, activePlugin); |
| 2794 | if (!fs.existsSync(d)) return []; |
| 2795 | try { |
| 2796 | const files = fs.readdirSync(d).filter(f => f.endsWith('.json')); |
| 2797 | console.log(`[Auth] listAuthProfiles(${p}): dir=${d}, count=${files.length}`); |
| 2798 | return files.map(f => f.replace('.json', '')); |
| 2799 | } catch { return []; } |
| 2800 | }; |
| 2801 | |
| 2802 | app.get('/api/auth/providers', (req, res) => { |
| 2803 | const providers = [ |