Spaces:
Sleeping
Sleeping
Create youtube_auth.html
Browse files- templates/youtube_auth.html +37 -0
templates/youtube_auth.html
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% extends "base.html" %}
|
| 2 |
+
|
| 3 |
+
{% block title %}YouTube Authentication - Telegram to YouTube Uploader{% endblock %}
|
| 4 |
+
|
| 5 |
+
{% block content %}
|
| 6 |
+
<h2>YouTube Authentication</h2>
|
| 7 |
+
|
| 8 |
+
{% if auth_url %}
|
| 9 |
+
<p>Please click the link below to authorize the application to access your YouTube account:</p>
|
| 10 |
+
<a href="{{ auth_url }}" target="_blank" class="btn btn-primary">Authorize on YouTube</a>
|
| 11 |
+
|
| 12 |
+
<div class="mt-4">
|
| 13 |
+
<h5>After Authorizing:</h5>
|
| 14 |
+
<ol>
|
| 15 |
+
<li>You will be redirected to a Google page.</li>
|
| 16 |
+
<li>Sign in to your Google account if prompted.</li>
|
| 17 |
+
<li>Review the permissions the app requests.</li>
|
| 18 |
+
<li>Click "Continue" or "Allow".</li>
|
| 19 |
+
<li>You will be redirected to a page with an authorization code in the URL (e.g., `http://127.0.0.1:8080/?code=...`).</li>
|
| 20 |
+
<li>Copy the entire authorization code from the URL (the part after `code=`).</li>
|
| 21 |
+
<li>Paste the code into the form below and submit it.</li>
|
| 22 |
+
</ol>
|
| 23 |
+
</div>
|
| 24 |
+
|
| 25 |
+
<form method="POST" action="{{ url_for('youtube_callback') }}" class="mt-3">
|
| 26 |
+
<div class="mb-3">
|
| 27 |
+
<label for="auth_code" class="form-label">Authorization Code</label>
|
| 28 |
+
<input type="text" class="form-control" id="auth_code" name="auth_code" required placeholder="Paste the code from the Google redirect URL">
|
| 29 |
+
</div>
|
| 30 |
+
<button type="submit" class="btn btn-success">Complete Authentication</button>
|
| 31 |
+
<a href="{{ url_for('dashboard') }}" class="btn btn-secondary">Back to Dashboard</a>
|
| 32 |
+
</form>
|
| 33 |
+
{% else %}
|
| 34 |
+
<p class="text-danger">Error: Authorization URL could not be generated.</p>
|
| 35 |
+
<a href="{{ url_for('dashboard') }}" class="btn btn-secondary">Back to Dashboard</a>
|
| 36 |
+
{% endif %}
|
| 37 |
+
{% endblock %}
|