Abhishek Thakur
commited on
Commit
·
2fb965b
1
Parent(s):
6ce1c19
no target
Browse files
competitions/oauth.py
CHANGED
|
@@ -39,7 +39,7 @@ def attach_oauth(app: fastapi.FastAPI):
|
|
| 39 |
SessionMiddleware,
|
| 40 |
secret_key=hashlib.sha256(session_secret.encode()).hexdigest(),
|
| 41 |
same_site="none",
|
| 42 |
-
https_only=True,
|
| 43 |
)
|
| 44 |
|
| 45 |
|
|
|
|
| 39 |
SessionMiddleware,
|
| 40 |
secret_key=hashlib.sha256(session_secret.encode()).hexdigest(),
|
| 41 |
same_site="none",
|
| 42 |
+
# https_only=True,
|
| 43 |
)
|
| 44 |
|
| 45 |
|
competitions/templates/index.html
CHANGED
|
@@ -388,7 +388,7 @@
|
|
| 388 |
class="mt-1 block w-full border border-gray-300 px-3 py-1.5 bg-white rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500">
|
| 389 |
</li>
|
| 390 |
<li id="loginButton" style="display: none;">
|
| 391 |
-
<a href="/login/huggingface"
|
| 392 |
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">Login with Hugging
|
| 393 |
Face</a>
|
| 394 |
</li>
|
|
@@ -468,6 +468,13 @@
|
|
| 468 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/flowbite/2.2.1/flowbite.min.js"></script>
|
| 469 |
</body>
|
| 470 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 471 |
<script>
|
| 472 |
document.addEventListener('DOMContentLoaded', function () {
|
| 473 |
document.querySelector('.confirm').addEventListener('click', function (event) {
|
|
|
|
| 388 |
class="mt-1 block w-full border border-gray-300 px-3 py-1.5 bg-white rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500">
|
| 389 |
</li>
|
| 390 |
<li id="loginButton" style="display: none;">
|
| 391 |
+
<a href="/login/huggingface"
|
| 392 |
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">Login with Hugging
|
| 393 |
Face</a>
|
| 394 |
</li>
|
|
|
|
| 468 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/flowbite/2.2.1/flowbite.min.js"></script>
|
| 469 |
</body>
|
| 470 |
|
| 471 |
+
<script>
|
| 472 |
+
document.getElementById('loginButton').addEventListener('click', function (event) {
|
| 473 |
+
event.preventDefault(); // Prevent the default link behavior
|
| 474 |
+
window.parent.location.href = this.getAttribute('href'); // Open link in parent window/tab
|
| 475 |
+
});
|
| 476 |
+
</script>
|
| 477 |
+
|
| 478 |
<script>
|
| 479 |
document.addEventListener('DOMContentLoaded', function () {
|
| 480 |
document.querySelector('.confirm').addEventListener('click', function (event) {
|