apps/api: pass creds for TELEGRAM_URL_SEND_AUTH_MESSAGE

This commit is contained in:
vchikalkin 2024-06-05 15:24:30 +03:00
parent 399179baa2
commit 6de1e1823f
3 changed files with 8 additions and 0 deletions

View File

@ -27,7 +27,9 @@ const envSchema = z.object({
.string()
.transform((val) => Number.parseInt(val, 10))
.default('6379'),
TELEGRAM_URL_SEND_AUTH_LOGIN: z.string(),
TELEGRAM_URL_SEND_AUTH_MESSAGE: z.string(),
TELEGRAM_URL_SEND_AUTH_PASSWORD: z.string(),
});
export default envSchema;

View File

@ -69,6 +69,10 @@ export class LdapTfaController extends LdapController {
return axios
.get(env.TELEGRAM_URL_SEND_AUTH_MESSAGE, {
auth: {
password: env.TELEGRAM_URL_SEND_AUTH_PASSWORD,
username: env.TELEGRAM_URL_SEND_AUTH_LOGIN,
},
params: {
authId,
employeeID,

View File

@ -28,6 +28,8 @@ services:
- REDIS_HOST=redis
- MONGO_HOST=mongo
- TELEGRAM_URL_SEND_AUTH_MESSAGE=${TELEGRAM_URL_SEND_AUTH_MESSAGE}
- TELEGRAM_URL_SEND_AUTH_LOGIN=${TELEGRAM_URL_SEND_AUTH_LOGIN}
- TELEGRAM_URL_SEND_AUTH_PASSWORD=${TELEGRAM_URL_SEND_AUTH_PASSWORD}
restart: always
networks:
- auth_network