You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Usually your login function will check for username and password, log the user in if the username and password are correct and create the user session, to support mfa, this has to change
#log_user_in is a function that handles creatung user session, it should be in the setting file as MFA_CALLBACK
117
117
```
118
-
1. Add mfa to urls.py
118
+
5. Add mfa to urls.py
119
119
```python
120
120
import mfa
121
121
import mfa.TrustedDevice
@@ -126,13 +126,14 @@ Depends on
126
126
'....',
127
127
]
128
128
```
129
-
1. Provide `mfa_auth_base.html`in your templaes with block called 'head'and'content'
130
-
The template will be included during the user login.
129
+
6. Provide `mfa_auth_base.html`in your templates with block called 'head'and'content', The template will be included during the user login, the template shall be close to the login template.
131
130
If you will use Email Token method, then you have to provide template named `mfa_email_token_template.html` that will content the format of the email with parameter named `user`and`otp`.
132
-
1. To match the look and feel of your project, MFA includes `base.html` but it needs blocks named `head`&`content` to added its content to it.
133
-
1. Somewhere in your app, add a link to 'mfa_home'
131
+
7. To match the look and feel of your project, MFA includes `base.html` but it needs blocks named `head`&`content` to added its content to it.
132
+
**Note:** Starting v2.3.0, a new template `mfa_base.html`is introduced, this template is used by `MFA.html` so you can control the styling better and current `mfa_base.html` extends `base.html`
133
+
8. Somewhere in your app, add a link to 'mfa_home'
0 commit comments