Skip to content

Commit

Permalink
Upgrade FIDO2 and fix Authorize button on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
mkalioby committed Oct 14, 2021
1 parent 773a16d commit 5475a3b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# Change Log
## 2.4.0

* Fixed: issue in the 'Authorize' button don't show on Safari Mobile.
* Upgrade to FIDO2 0.9.2, to fix issue with Windows 11.
* Fixed: Minor Typos.


## 2.3.0
* Fixed: A missing import Thanks @AndreasDickow
* Fixed: `MFA.html` now call `{{block.super}}` for head and content blocks, thanks @mnelson4
Expand Down
6 changes: 3 additions & 3 deletions example/example/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []
ALLOWED_HOSTS = ['*']


# Application definition
Expand Down Expand Up @@ -146,5 +146,5 @@
TOKEN_ISSUER_NAME="PROJECT_NAME" #TOTP Issuer name

U2F_APPID="https://localhost" #URL For U2F
FIDO_SERVER_ID=u"localhost" # Server rp id for FIDO2, it the full domain of your project
FIDO_SERVER_NAME=u"PROJECT_NAME"
FIDO_SERVER_ID=u"local.mkalioby.com" # Server rp id for FIDO2, it the full domain of your project
FIDO_SERVER_NAME=u"TestApp"
6 changes: 3 additions & 3 deletions mfa/templates/FIDO2/Add.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@
if (res["status"] =='OK')
$("#res").html("<div class='alert alert-success'>Registered Successfully, <a href='{{redirect_html}}'> {{reg_success_msg}}</a></div>")
else
$("#res").html("<div class='alert alert-danger'>Registeration Failed as " + res["message"] + ", <a href='javascript:void(0)' onclick='begin_reg()'> try again or <a href='{% url 'mfa_home' %}'> Go to Security Home</a></div>")
$("#res").html("<div class='alert alert-danger'>Registration Failed as " + res["message"] + ", <a href='javascript:void(0)' onclick='begin_reg()'> try again or <a href='{% url 'mfa_home' %}'> Go to Security Home</a></div>")


}, function(reason) {
$("#res").html("<div class='alert alert-danger'>Registeration Failed as " +reason +", <a href='javascript:void(0)' onclick='begin_reg()'> try again </a> or <a href='{% url 'mfa_home' %}'> Go to Security Home</a></div>")
$("#res").html("<div class='alert alert-danger'>Registration Failed as " +reason +", <a href='javascript:void(0)' onclick='begin_reg()'> try again </a> or <a href='{% url 'mfa_home' %}'> Go to Security Home</a></div>")
})
}
$(document).ready(function (){
ua=new UAParser().getResult()
if (ua.browser.name == "Safari")
if (ua.browser.name == "Safari" || ua.browser.name == "Mobile Safari" )
{
$("#res").html("<button class='btn btn-success' onclick='begin_reg()'>Start...</button>")
}
Expand Down
2 changes: 1 addition & 1 deletion mfa/templates/FIDO2/recheck.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
$("#main_paragraph").html("FIDO2 must work under secure context")
} else {
ua=new UAParser().getResult()
if (ua.browser.name == "Safari")
if (ua.browser.name == "Safari" || ua.browser.name == "Mobile Safari" )
$("#res").html("<button class='btn btn-success' onclick='authen()'>Authenticate...</button>")
else
authen()
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name='django-mfa2',
version='2.3.0',
version='2.4.0',
description='Allows user to add 2FA to their accounts',
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
Expand All @@ -24,7 +24,7 @@
'ua-parser',
'user-agents',
'python-jose',
'fido2 == 0.9.1',
'fido2 == 0.9.2',
'jsonLookup'
],
python_requires=">=3.5",
Expand Down

0 comments on commit 5475a3b

Please sign in to comment.