Telegram#

Telegram does not strictly regulate the authorization expiration time, so you may need to set your own expiration time, which can be less than the default value. You can also set this parameter in Social applications settings as json {"auth_date_validity": 100}. The default value of the auth_date_validity is 30 seconds.

SOCIALACCOUNT_PROVIDERS = {
    'telegram': {
        'APP': {
            'client_id': '<bot_id>',
            'secret': '<bot token>',
        },
        'AUTH_PARAMS': {'auth_date_validity': 30},
    }
}

Attention! If your server time is different from the telegram server time, you need NTP.