new yandex

This commit is contained in:
Administrator 2023-10-09 23:46:28 +03:00
parent 81012de98c
commit 6bb4e9ac44
3 changed files with 3 additions and 3 deletions

View File

@ -55,7 +55,7 @@
{% if account.vk_id %} {% if account.vk_id %}
<div style="margin-top: -15px; margin-left: 30px;"><i style="color: green;" class="fa fa-check-circle"></i></div> <div style="margin-top: -15px; margin-left: 30px;"><i style="color: green;" class="fa fa-check-circle"></i></div>
{% endif %} {% endif %}
<a href="https://oauth.yandex.ru/authorize?response_type=code&client_id=38f1906e99de4810bd79828f420ba885&redirect_uri=https://platform.sprinthub.ru/yandex_auth"><img style="width: 40px; height: 40px;" src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/58/Yandex_icon.svg/2048px-Yandex_icon.svg.png"></a> <a href="https://oauth.yandex.ru/authorize?response_type=code&client_id=2c5235f2ce5b4665856d15f70aa876f2&redirect_uri=https://platform.sprinthub.ru/yandex_auth"><img style="width: 40px; height: 40px;" src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/58/Yandex_icon.svg/2048px-Yandex_icon.svg.png"></a>
{% if account.yandex_id %} {% if account.yandex_id %}
<div style="margin-top: -15px; margin-left: 30px;"><i style="color: green;" class="fa fa-check-circle"></i></div> <div style="margin-top: -15px; margin-left: 30px;"><i style="color: green;" class="fa fa-check-circle"></i></div>
{% endif %} {% endif %}

View File

@ -20,7 +20,7 @@
</div> </div>
или войти с помощью<br><br> или войти с помощью<br><br>
<a href="https://oauth.vk.com/authorize?client_id=8123759&redirect_uri=https://platform.sprinthub.ru/vk_auth&display=page&response_type=token&v=5.59"><img style="width: 40px; height: 40px;" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f3/VK_Compact_Logo_%282021-present%29.svg/1200px-VK_Compact_Logo_%282021-present%29.svg.png"></a> <a href="https://oauth.vk.com/authorize?client_id=8123759&redirect_uri=https://platform.sprinthub.ru/vk_auth&display=page&response_type=token&v=5.59"><img style="width: 40px; height: 40px;" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f3/VK_Compact_Logo_%282021-present%29.svg/1200px-VK_Compact_Logo_%282021-present%29.svg.png"></a>
<a href="https://oauth.yandex.ru/authorize?response_type=code&client_id=38f1906e99de4810bd79828f420ba885&redirect_uri=https://platform.sprinthub.ru/yandex_auth"><img style="width: 40px; height: 40px; margin-left: 10px;" src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/58/Yandex_icon.svg/2048px-Yandex_icon.svg.png"></a> <a href="https://oauth.yandex.ru/authorize?response_type=code&client_id=2c5235f2ce5b4665856d15f70aa876f2&redirect_uri=https://platform.sprinthub.ru/yandex_auth"><img style="width: 40px; height: 40px; margin-left: 10px;" src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/58/Yandex_icon.svg/2048px-Yandex_icon.svg.png"></a>
</div> </div>
</center> </center>
</div> </div>

View File

@ -13,7 +13,7 @@ class YandexAuthView(BaseView):
def get(self): def get(self):
code = self.request.GET['code'] code = self.request.GET['code']
response = post('https://oauth.yandex.ru/token', data={ response = post('https://oauth.yandex.ru/token', data={
'client_id': '38f1906e99de4810bd79828f420ba885', 'client_id': '2c5235f2ce5b4665856d15f70aa876f2',
'client_secret': settings.YANDEX_SERVICE_TOKEN, 'client_secret': settings.YANDEX_SERVICE_TOKEN,
'grant_type': 'authorization_code', 'grant_type': 'authorization_code',
'code': code 'code': code