diff --git a/CHANGELOG.md b/CHANGELOG.md index a513482..ecd1b08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Change Log +## 2.1.0 + * Added Support for Touch ID for Mac OSx and iOS 14 on Safari + ## 2.0.5 * Fixed issue in __version__ diff --git a/mfa/__init__.py b/mfa/__init__.py index c5ce768..8eef514 100644 --- a/mfa/__init__.py +++ b/mfa/__init__.py @@ -1 +1 @@ -__version__="2.0.5" +__version__="2.1.0" diff --git a/mfa/static/mfa/js/ua-parser.min.js b/mfa/static/mfa/js/ua-parser.min.js new file mode 100644 index 0000000..23e2d07 --- /dev/null +++ b/mfa/static/mfa/js/ua-parser.min.js @@ -0,0 +1,9 @@ +/*! + * UAParser.js v0.7.23 + * Lightweight JavaScript-based User-Agent string parser + * https://github.com/faisalman/ua-parser-js + * + * Copyright © 2012-2019 Faisal Salman + * Licensed under MIT License + */ +(function(window,undefined){"use strict";var LIBVERSION="0.7.23",EMPTY="",UNKNOWN="?",FUNC_TYPE="function",UNDEF_TYPE="undefined",OBJ_TYPE="object",STR_TYPE="string",MAJOR="major",MODEL="model",NAME="name",TYPE="type",VENDOR="vendor",VERSION="version",ARCHITECTURE="architecture",CONSOLE="console",MOBILE="mobile",TABLET="tablet",SMARTTV="smarttv",WEARABLE="wearable",EMBEDDED="embedded";var util={extend:function(regexes,extensions){var mergedRegexes={};for(var i in regexes){if(extensions[i]&&extensions[i].length%2===0){mergedRegexes[i]=extensions[i].concat(regexes[i])}else{mergedRegexes[i]=regexes[i]}}return mergedRegexes},has:function(str1,str2){if(typeof str1==="string"){return str2.toLowerCase().indexOf(str1.toLowerCase())!==-1}else{return false}},lowerize:function(str){return str.toLowerCase()},major:function(version){return typeof version===STR_TYPE?version.replace(/[^\d\.]/g,"").split(".")[0]:undefined},trim:function(str){return str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}};var mapper={rgx:function(ua,arrays){var i=0,j,k,p,q,matches,match;while(i0){if(q.length==2){if(typeof q[1]==FUNC_TYPE){this[q[0]]=q[1].call(this,match)}else{this[q[0]]=q[1]}}else if(q.length==3){if(typeof q[1]===FUNC_TYPE&&!(q[1].exec&&q[1].test)){this[q[0]]=match?q[1].call(this,match,q[2]):undefined}else{this[q[0]]=match?match.replace(q[1],q[2]):undefined}}else if(q.length==4){this[q[0]]=match?q[3].call(this,match.replace(q[1],q[2])):undefined}}else{this[q]=match?match:undefined}}}}i+=2}},str:function(str,map){for(var i in map){if(typeof map[i]===OBJ_TYPE&&map[i].length>0){for(var j=0;j + {% endblock %} @@ -55,8 +66,8 @@
-
-

Your broswer should ask you to confirm you indentity.

+
+

Your browser should ask you to confirm you identity.

diff --git a/mfa/templates/FIDO2/recheck.html b/mfa/templates/FIDO2/recheck.html index 5fe9781..3dc0609 100644 --- a/mfa/templates/FIDO2/recheck.html +++ b/mfa/templates/FIDO2/recheck.html @@ -1,5 +1,6 @@ {% load static %} +
@@ -17,7 +18,9 @@
{% endif %} -

please press the button on your security key to prove it is you.

+
+

please press the button on your security key to prove it is you.

+
{% if mode == "auth" %}
@@ -101,7 +104,11 @@ $("#main_paragraph").addClass("alert alert-danger") $("#main_paragraph").html("FIDO2 must work under secure context") } else { - authen() + ua=new UAParser().getResult() + if (ua.browser.name == "Safari") + $("#res").html("") + else + authen() } }); diff --git a/setup.py b/setup.py index fdc621a..2e537ef 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from setuptools import find_packages, setup setup( name='django-mfa2', - version='2.0.5', + version='2.1.0', description='Allows user to add 2FA to their accounts', long_description=open("README.md").read(), long_description_content_type="text/markdown", @@ -24,12 +24,12 @@ setup( 'ua-parser', 'user-agents', 'python-jose', - 'fido2 == 0.8.1', + 'fido2 == 0.9', 'jsonLookup' ], python_requires=">=3.5", include_package_data=True, - zip_safe=False, # because we're including static files + zip_safe=False, # because we're including static files classifiers=[ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment",