Skip to content

Commit

Permalink
Change name from second_factor to two_factor
Browse files Browse the repository at this point in the history
  • Loading branch information
leportella committed Mar 4, 2019
1 parent 215f527 commit a9f7057
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions nativeauthenticator/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ async def post(self):
ask_email=self.authenticator.ask_email_on_signup,
result_message=message,
alert=alert,
second_factor_auth=self.authenticator.add_two_factor_authentication,
second_factor_auth_value=otp_secret,
two_factor_auth=self.authenticator.add_two_factor_authentication,
two_factor_auth_value=otp_secret,
)
self.finish(html)

Expand Down Expand Up @@ -141,7 +141,7 @@ def _render(self, login_error=None, username=None):
login_error=login_error,
custom_html=self.authenticator.custom_html,
login_url=self.settings['login_url'],
second_factor_auth=self.authenticator.add_two_factor_authentication,
two_factor_auth=self.authenticator.add_two_factor_authentication,
authenticator_login_url=url_concat(
self.authenticator.login_url(self.hub.base_url),
{'next': self.get_argument('next', '')},
Expand Down
2 changes: 1 addition & 1 deletion nativeauthenticator/templates/native-login.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<label for="username_input">Username:</label>
<input id="username_input" type="text" autocapitalize="off" autocorrect="off" class="form-control" name="username" val="{{username}}"
tabindex="1" autofocus="autofocus" />
{% if second_factor_auth %}
{% if two_factor_auth %}
<label for="2auth_input">Second auth factor:</label>
<input id="2auth_input" type="text" autocapitalize="off" autocorrect="off" class="form-control" name="2auth" tabindex="1" autofocus="autofocus" />
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions nativeauthenticator/templates/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
{% if alert %}
<div class="alert {{alert}}" style="margin-top: 15px;" role="alert">
{{result_message}}
{% if second_factor_auth %}
{% if two_factor_auth %}
<p><p/>
<strong>Attention!</strong> This system requires two factor authentication.
<br/>
Your two factor authentication code is <strong>{{ second_factor_auth_value }}</strong>. Be sure to keep it safe :)
Your two factor authentication code is <strong>{{ two_factor_auth_value }}</strong>. Be sure to keep it safe :)
{% endif %}
</div>
{% endif %}
Expand Down

0 comments on commit a9f7057

Please sign in to comment.