<?php
echo "<a href='tg://resolve?domain=" . $config['bot'] . "&start=" . $key . "' id='auth' </a>";
?>
<div class="modal fade" id="staticBackdrop" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="staticBackdropLabel">Автризация</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Закрыть"></button>
</div>
<div class="modal-body">
<center>
}<a button type="button" class="btn btn-primary" data-toggle="button" aria-pressed="false" autocomplete="off">
<img src="/images/tg.svg" height="20px" width="20px"> авторизоваться
</a></button></center>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Закрыть</button>
</div>
</div>
</div>
</div>
echo "<script>const tg_href = 'tg://resolve?domain=" . $config['bot'] . "&start=" . $key . "&id=auth';</script>";
<button onclick="window.open('tg_href');"