fix some mastodon 3.x login
This commit is contained in:
parent
8eaaf141fa
commit
bb6e7dccb6
3 changed files with 3 additions and 3 deletions
|
@ -12,7 +12,7 @@ repos:
|
|||
language_version: python3.11
|
||||
repos:
|
||||
- repo: https://github.com/Riverside-Healthcare/djLint
|
||||
rev: v1.28.0
|
||||
rev: v1.30.2
|
||||
hooks:
|
||||
- id: djlint-reformat-django
|
||||
- id: djlint-django
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
dateparser
|
||||
mistune @ git+https://github.com/alphatownsman/mistune.git@660b1c0100ecdd6cd6aca26a554be2606a67d67b
|
||||
rq>=1.12.0
|
||||
django~=3.2.18
|
||||
django~=3.2.19
|
||||
django-auditlog
|
||||
django-markdownx @ git+https://github.com/alphatownsman/django-markdownx.git@e69480c64ad9c5d0499f4a8625da78cf2bb7691b
|
||||
django-jsoneditor @ git+https://github.com/alphatownsman/django-jsoneditor.git@fa2ae41aeeb34447bd8a808a520e843c853fd16e
|
||||
|
|
|
@ -243,7 +243,7 @@ def swap_login(request, token, site, refresh_token):
|
|||
|
||||
def auth_login(request, user):
|
||||
"""Decorates django ``login()``. Attach token to session."""
|
||||
auth.login(request, user)
|
||||
auth.login(request, user, backend="mastodon.auth.OAuth2Backend")
|
||||
if (
|
||||
user.mastodon_last_refresh < timezone.now() - timedelta(hours=1)
|
||||
or user.mastodon_account == {}
|
||||
|
|
Loading…
Add table
Reference in a new issue