Skip to content

Commit

Permalink
Allauth: 2FA (#11524)
Browse files Browse the repository at this point in the history
* Authenticated: Two-factor authentication

Closes #3523

* Merge
  • Loading branch information
stsewd authored Aug 22, 2024
1 parent 80271b3 commit f808dcd
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 7 deletions.
3 changes: 2 additions & 1 deletion readthedocs/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ def INSTALLED_APPS(self): # noqa
"allauth.socialaccount.providers.github",
"allauth.socialaccount.providers.gitlab",
"allauth.socialaccount.providers.bitbucket_oauth2",
"allauth.mfa",
"cacheops",
]
if ext:
Expand Down Expand Up @@ -661,7 +662,7 @@ def DOCKER_LIMITS(self):
)
return limits

# All auth
# Allauth
ACCOUNT_ADAPTER = "readthedocs.core.adapters.AccountAdapter"
ACCOUNT_EMAIL_REQUIRED = True

Expand Down
16 changes: 15 additions & 1 deletion requirements/deploy.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ cron-descriptor==1.4.3
cryptography==43.0.0
# via
# -r requirements/pip.txt
# fido2
# pyjwt
cssselect==1.2.0
# via
Expand Down Expand Up @@ -120,7 +121,7 @@ django==4.2.15
# django-timezone-field
# djangorestframework
# jsonfield
django-allauth[saml,socialaccount]==64.0.0
django-allauth[mfa,saml,socialaccount]==64.0.0
# via -r requirements/pip.txt
django-annoying==0.10.7
# via -r requirements/pip.txt
Expand Down Expand Up @@ -205,6 +206,10 @@ exceptiongroup==1.2.2
# via ipython
executing==2.0.1
# via stack-data
fido2==1.1.3
# via
# -r requirements/pip.txt
# django-allauth
filelock==3.15.4
# via
# -r requirements/pip.txt
Expand Down Expand Up @@ -312,6 +317,10 @@ pyjwt[crypto]==2.9.0
# via
# -r requirements/pip.txt
# django-allauth
pypng==0.20220715.0
# via
# -r requirements/pip.txt
# qrcode
pyquery==2.0.0
# via -r requirements/pip.txt
python-crontab==3.2.0
Expand All @@ -334,6 +343,10 @@ pytz==2024.1
# celery
pyyaml==6.0.2
# via -r requirements/pip.txt
qrcode==7.4.2
# via
# -r requirements/pip.txt
# django-allauth
redis==5.0.8
# via
# -r requirements/pip.txt
Expand Down Expand Up @@ -414,6 +427,7 @@ typing-extensions==4.12.2
# ipython
# psycopg
# psycopg-pool
# qrcode
tzdata==2024.1
# via
# -r requirements/pip.txt
Expand Down
16 changes: 15 additions & 1 deletion requirements/docker.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ cron-descriptor==1.4.3
cryptography==43.0.0
# via
# -r requirements/pip.txt
# fido2
# pyjwt
cssselect==1.2.0
# via
Expand Down Expand Up @@ -130,7 +131,7 @@ django==4.2.15
# django-timezone-field
# djangorestframework
# jsonfield
django-allauth[saml,socialaccount]==64.0.0
django-allauth[mfa,saml,socialaccount]==64.0.0
# via -r requirements/pip.txt
django-annoying==0.10.7
# via -r requirements/pip.txt
Expand Down Expand Up @@ -217,6 +218,10 @@ executing==2.0.1
# via stack-data
fancycompleter==0.9.1
# via pdbpp
fido2==1.1.3
# via
# -r requirements/pip.txt
# django-allauth
filelock==3.15.4
# via
# -r requirements/pip.txt
Expand Down Expand Up @@ -338,6 +343,10 @@ pyjwt[crypto]==2.9.0
# via
# -r requirements/pip.txt
# django-allauth
pypng==0.20220715.0
# via
# -r requirements/pip.txt
# qrcode
pyproject-api==1.7.1
# via tox
pyquery==2.0.0
Expand All @@ -364,6 +373,10 @@ pytz==2024.1
# celery
pyyaml==6.0.2
# via -r requirements/pip.txt
qrcode==7.4.2
# via
# -r requirements/pip.txt
# django-allauth
redis==5.0.8
# via
# -r requirements/pip.txt
Expand Down Expand Up @@ -446,6 +459,7 @@ typing-extensions==4.12.2
# ipython
# psycopg
# psycopg-pool
# qrcode
tzdata==2024.1
# via
# -r requirements/pip.txt
Expand Down
2 changes: 1 addition & 1 deletion requirements/pip.in
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ django-celery-beat
# TODO: remove this dependency once we upgrade Celery. It should auto-install it.
tzdata

django-allauth[socialaccount,saml]
django-allauth[socialaccount,saml,mfa]

requests-oauthlib

Expand Down
13 changes: 11 additions & 2 deletions requirements/pip.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ colorama==0.4.6
cron-descriptor==1.4.3
# via django-celery-beat
cryptography==43.0.0
# via pyjwt
# via
# fido2
# pyjwt
cssselect==1.2.0
# via pyquery
distlib==0.3.8
Expand Down Expand Up @@ -83,7 +85,7 @@ django==4.2.15
# django-timezone-field
# djangorestframework
# jsonfield
django-allauth[saml,socialaccount]==64.0.0
django-allauth[mfa,saml,socialaccount]==64.0.0
# via -r requirements/pip.in
django-annoying==0.10.7
# via -r requirements/pip.in
Expand Down Expand Up @@ -160,6 +162,8 @@ elasticsearch-dsl==8.14.0
# via
# -r requirements/pip.in
# django-elasticsearch-dsl
fido2==1.1.3
# via django-allauth
filelock==3.15.4
# via virtualenv
funcy==2.0
Expand Down Expand Up @@ -218,6 +222,8 @@ pygments==2.18.0
# via -r requirements/pip.in
pyjwt[crypto]==2.9.0
# via django-allauth
pypng==0.20220715.0
# via qrcode
pyquery==2.0.0
# via -r requirements/pip.in
python-crontab==3.2.0
Expand All @@ -236,6 +242,8 @@ pytz==2024.1
# celery
pyyaml==6.0.2
# via -r requirements/pip.in
qrcode==7.4.2
# via django-allauth
redis==5.0.8
# via
# -r requirements/pip.in
Expand Down Expand Up @@ -294,6 +302,7 @@ typing-extensions==4.12.2
# elasticsearch-dsl
# psycopg
# psycopg-pool
# qrcode
tzdata==2024.1
# via
# -r requirements/pip.in
Expand Down
16 changes: 15 additions & 1 deletion requirements/testing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ cron-descriptor==1.4.3
cryptography==43.0.0
# via
# -r requirements/pip.txt
# fido2
# pyjwt
cssselect==1.2.0
# via
Expand Down Expand Up @@ -125,7 +126,7 @@ django==4.2.15
# django-timezone-field
# djangorestframework
# jsonfield
django-allauth[saml,socialaccount]==64.0.0
django-allauth[mfa,saml,socialaccount]==64.0.0
# via -r requirements/pip.txt
django-annoying==0.10.7
# via -r requirements/pip.txt
Expand Down Expand Up @@ -212,6 +213,10 @@ elasticsearch-dsl==8.14.0
# django-elasticsearch-dsl
exceptiongroup==1.2.2
# via pytest
fido2==1.1.3
# via
# -r requirements/pip.txt
# django-allauth
filelock==3.15.4
# via
# -r requirements/pip.txt
Expand Down Expand Up @@ -314,6 +319,10 @@ pyjwt[crypto]==2.9.0
# via
# -r requirements/pip.txt
# django-allauth
pypng==0.20220715.0
# via
# -r requirements/pip.txt
# qrcode
pyquery==2.0.0
# via -r requirements/pip.txt
pytest==8.3.2
Expand Down Expand Up @@ -354,6 +363,10 @@ pyyaml==6.0.2
# via
# -r requirements/pip.txt
# yamale
qrcode==7.4.2
# via
# -r requirements/pip.txt
# django-allauth
redis==5.0.8
# via
# -r requirements/pip.txt
Expand Down Expand Up @@ -444,6 +457,7 @@ typing-extensions==4.12.2
# elasticsearch-dsl
# psycopg
# psycopg-pool
# qrcode
# sphinx
tzdata==2024.1
# via
Expand Down

0 comments on commit f808dcd

Please sign in to comment.