Teletube / templates /telegram_auth.html
NitinBot002's picture
Update templates/telegram_auth.html
762df55 verified
{% extends "base.html" %}
{% block title %}Telegram Authentication - Telegram to YouTube Uploader{% endblock %}
{% block content %}
<h2>Telegram Authentication</h2>
{% if session.get('telegram_needs_code') %}
<div class="alert alert-info" role="alert">
<strong>OTP Required:</strong> Please check your Telegram app or SMS for a login code and enter it below.
<p class="mb-0"><small>If you have 2FA enabled, you might be prompted for your password after entering the code.</small></p>
</div>
<form method="POST" action="{{ url_for('telegram_callback') }}">
<div class="mb-3">
<label for="otp_code" class="form-label">One-Time Password (OTP)</label>
<input type="text" class="form-control" id="otp_code" name="otp_code" required placeholder="Enter the code sent to your Telegram app/SMS">
</div>
<button type="submit" class="btn btn-success">Submit OTP</button>
<a href="{{ url_for('dashboard') }}" class="btn btn-secondary">Cancel</a>
</form>
{% elif status.telegram_authenticated %}
<div class="alert alert-success" role="alert">
<strong>Success!</strong> The application is already connected to Telegram.
</div>
<a href="{{ url_for('dashboard') }}" class="btn btn-primary">Back to Dashboard</a>
{% else %}
<p>Click the button below to initiate the Telegram connection process. If an OTP is required, you will be prompted on this page.</p>
<form method="POST" action="{{ url_for('initiate_telegram_auth') }}">
<button type="submit" class="btn btn-primary">Connect to Telegram</button>
</form>
<a href="{{ url_for('dashboard') }}" class="btn btn-secondary mt-2">Back to Dashboard</a>
{% endif %}
{% endblock %}