From c5d23c876b0f7cdf8d60e4d50d2e6f7e3b7f01aa Mon Sep 17 00:00:00 2001 From: Rafael Lopes Date: Fri, 8 May 2026 16:29:29 -0300 Subject: [PATCH] FEAT : Atualizado env para login com Microsoft e LDAP/AD --- .env.example | 29 +++++++++++++++++++++++++++++ .gitignore | 2 ++ 2 files changed, 31 insertions(+) diff --git a/.env.example b/.env.example index 9eb68fb..5f7d33b 100644 --- a/.env.example +++ b/.env.example @@ -15,3 +15,32 @@ DB_NAME=omnichannel # Ports (optional, if you want to reference in compose later) FRONTEND_PORT=3000 BACKEND_PORT=3001 + +# Backend HTTP/JWT +PORT=3001 +FRONTEND_URL=http://localhost:3000 +JWT_SECRET=change-this-long-random-secret +JWT_EXPIRES_IN=8h + +# Auth providers: ldap,microsoft or only one of them +AUTH_PROVIDERS=ldap,microsoft + +# LDAP / Active Directory +LDAP_ENABLED=true +LDAP_URL=ldaps://kratos.sothistelecom.com:636 +LDAP_DOMAIN=sothis.com.br +# Alternative when the bind user is not username@domain: +LDAP_USER_DN_TEMPLATE={{username}}@sothis.com.br +# Optional search to enrich the authenticated profile: +LDAP_SEARCH_BASE=DC=sothistelecom,DC=com +LDAP_SEARCH_FILTER=(&(objectClass=user)(sAMAccountName={{username}})) +# LDAP_BIND_DN=CN=ldap-reader,OU=Users,DC=example,DC=com +# LDAP_BIND_PASSWORD=change-me + +# Microsoft Entra ID OAuth +MICROSOFT_ENABLED=false +MICROSOFT_TENANT_ID=common +MICROSOFT_CLIENT_ID= +MICROSOFT_CLIENT_SECRET= +MICROSOFT_REDIRECT_URI=http://localhost:3001/auth/oauth/microsoft/callback +MICROSOFT_SUCCESS_REDIRECT_URL=http://localhost:3000/login diff --git a/.gitignore b/.gitignore index 7066758..c0e58f5 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ dist frontend/node_modules frontend/dist .DS_Store +.env.development +.env.production \ No newline at end of file