diff --git a/README.md b/README.md index dadccc8..a640732 100644 --- a/README.md +++ b/README.md @@ -194,6 +194,25 @@ function some_func() { ```` +# Using ConditionalUI + +![ConditionalUI](img/conditionalUI.png) + +ConditionalUI is a cutting-edge feature that allows the user to use the browser autofill feature available in the browser to login using the FIDO2. + +Currently available on Safari on iOS 16+, Safari on Ventura, Chrome on Android (Using Play Services Beta), Chrome Canary on Both Mac OS X and Windows. + +To Use this feature +1. set `MFA_FIDO2_RESIDENT_KEY` to `mfa.ResidentKey.REQUIRED` +2. set the autocomplete of username field to `username webauth` as follows + ```html + + ``` +3. Finally, Include `FIDO2/FormFill.html` in your login form + ```html + {% include 'FIDO2/FormFill.html' %} + ``` + # Contributors * [mahmoodnasr](https://github.com/mahmoodnasr) * [d3cline](https://github.com/d3cline) diff --git a/example/example/templates/login.html b/example/example/templates/login.html index 22a6ae8..b61b094 100644 --- a/example/example/templates/login.html +++ b/example/example/templates/login.html @@ -33,7 +33,7 @@ {% csrf_token %}
- +
@@ -45,8 +45,6 @@
- - @@ -58,7 +56,9 @@ - {% include 'FIDO2/Auth_JS.html'%} + + {% include 'FIDO2/FormFill.html' %} +{# {% include 'FIDO2/Auth_JS.html' %}#} diff --git a/img/conditionalUI.png b/img/conditionalUI.png new file mode 100644 index 0000000..5d75ed9 Binary files /dev/null and b/img/conditionalUI.png differ diff --git a/mfa/templates/FIDO2/Auth_JS.html b/mfa/templates/FIDO2/Auth_JS.html index e31d8ed..a4a5b8c 100644 --- a/mfa/templates/FIDO2/Auth_JS.html +++ b/mfa/templates/FIDO2/Auth_JS.html @@ -2,16 +2,19 @@ +{% include 'FIDO2/Auth_JS.html' with conditionalUI=True %}