diff --git a/server.ts b/server.ts index 40d2730..4871e5b 100644 --- a/server.ts +++ b/server.ts @@ -149,7 +149,12 @@ async function startServer() { const clientId = getSetting('azure_client_id'); const tenantId = getSetting('azure_tenant_id'); const secret = getSetting('azure_client_secret'); - res.json({ azureEnabled: enabled && Boolean(clientId) && Boolean(tenantId) && Boolean(secret) }); + const appUrl = process.env.APP_URL || `http://localhost:${PORT}`; + const effectiveRedirectUri = getSetting('azure_redirect_uri') || `${appUrl}/api/auth/azure/callback`; + res.json({ + azureEnabled: enabled && Boolean(clientId) && Boolean(tenantId) && Boolean(secret), + effectiveRedirectUri, + }); }); // Start Azure OAuth flow diff --git a/src/components/Settings.tsx b/src/components/Settings.tsx index 074ea6d..3307512 100644 --- a/src/components/Settings.tsx +++ b/src/components/Settings.tsx @@ -77,7 +77,7 @@ function Input({ value, onChange, placeholder, monospace, icon }: { value={value} onChange={e => onChange(e.target.value)} placeholder={placeholder} - className={`w-full bg-slate-950 border border-slate-800 rounded-lg py-2.5 text-sm text-white placeholder-slate-600 focus:outline-none focus:ring-1 focus:ring-cyan-500/40 focus:border-cyan-500/40 transition-all ${icon ? 'pl-9 pr-3' : 'px-3'} ${monospace ? 'font-mono text-xs' : ''}`} + className={`w-full bg-slate-900 border border-slate-700 rounded-lg py-2.5 text-sm text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500/50 transition-all ${icon ? 'pl-9 pr-3' : 'px-3'} ${monospace ? 'font-mono text-xs' : ''}`} /> ); @@ -100,7 +100,7 @@ function SecretInput({ value, onChange, alreadySet, show, onToggleShow }: { value={value} onChange={e => onChange(e.target.value)} placeholder={alreadySet ? '•••••••• (leave blank to keep)' : 'Paste secret value'} - className="w-full bg-slate-950 border border-slate-800 rounded-lg pl-9 pr-10 py-2.5 text-xs font-mono text-white placeholder-slate-600 focus:outline-none focus:ring-1 focus:ring-cyan-500/40 focus:border-cyan-500/40 transition-all" + className="w-full bg-slate-900 border border-slate-700 rounded-lg pl-9 pr-10 py-2.5 text-xs font-mono text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500/50 transition-all" />