Teletube / templates /youtube_auth.html
NitinBot002's picture
Create youtube_auth.html
074fe33 verified
{% extends "base.html" %}
{% block title %}YouTube Authentication - Telegram to YouTube Uploader{% endblock %}
{% block content %}
<h2>YouTube Authentication</h2>
{% if auth_url %}
<p>Please click the link below to authorize the application to access your YouTube account:</p>
<a href="{{ auth_url }}" target="_blank" class="btn btn-primary">Authorize on YouTube</a>
<div class="mt-4">
<h5>After Authorizing:</h5>
<ol>
<li>You will be redirected to a Google page.</li>
<li>Sign in to your Google account if prompted.</li>
<li>Review the permissions the app requests.</li>
<li>Click "Continue" or "Allow".</li>
<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>
<li>Copy the entire authorization code from the URL (the part after `code=`).</li>
<li>Paste the code into the form below and submit it.</li>
</ol>
</div>
<form method="POST" action="{{ url_for('youtube_callback') }}" class="mt-3">
<div class="mb-3">
<label for="auth_code" class="form-label">Authorization Code</label>
<input type="text" class="form-control" id="auth_code" name="auth_code" required placeholder="Paste the code from the Google redirect URL">
</div>
<button type="submit" class="btn btn-success">Complete Authentication</button>
<a href="{{ url_for('dashboard') }}" class="btn btn-secondary">Back to Dashboard</a>
</form>
{% else %}
<p class="text-danger">Error: Authorization URL could not be generated.</p>
<a href="{{ url_for('dashboard') }}" class="btn btn-secondary">Back to Dashboard</a>
{% endif %}
{% endblock %}