forked from WeblateOrg/weblate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(auth): add two-factor authentication
- Implemented using django-otp and django-otp-webauthn - Support for TOTP, WebAuthn and recovery codes Fixes WeblateOrg#1681
- Loading branch information
Showing
21 changed files
with
1,187 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
weblate/accounts/migrations/0012_alter_auditlog_activity_profile_last_2fa.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Copyright © Michal Čihař <michal@weblate.org> | ||
# | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
# Generated by Django 5.0.7 on 2024-08-03 06:54 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("accounts", "0011_alter_subscription_notification"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="auditlog", | ||
name="activity", | ||
field=models.CharField( | ||
choices=[ | ||
("accepted", "accepted"), | ||
("auth-connect", "auth-connect"), | ||
("auth-disconnect", "auth-disconnect"), | ||
("autocreated", "autocreated"), | ||
("blocked", "blocked"), | ||
("connect", "connect"), | ||
("disabled", "disabled"), | ||
("donate", "donate"), | ||
("email", "email"), | ||
("enabled", "enabled"), | ||
("failed-auth", "failed-auth"), | ||
("full_name", "full_name"), | ||
("invited", "invited"), | ||
("locked", "locked"), | ||
("login", "login"), | ||
("login-new", "login-new"), | ||
("password", "password"), | ||
("recovery-generate", "recovery-generate"), | ||
("recovery-show", "recovery-show"), | ||
("register", "register"), | ||
("removal-request", "removal-request"), | ||
("removed", "removed"), | ||
("reset", "reset"), | ||
("reset-request", "reset-request"), | ||
("sent-email", "sent-email"), | ||
("team-add", "team-add"), | ||
("team-remove", "team-remove"), | ||
("tos", "tos"), | ||
("trial", "trial"), | ||
("twofactor-add", "twofactor-add"), | ||
("twofactor-login", "twofactor-login"), | ||
("twofactor-remove", "twofactor-remove"), | ||
("username", "username"), | ||
], | ||
db_index=True, | ||
max_length=20, | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="profile", | ||
name="last_2fa", | ||
field=models.CharField( | ||
blank=True, | ||
choices=[("", "None"), ("totp", "TOTP"), ("webauthn", "WebAuthn")], | ||
default="", | ||
max_length=15, | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.