Add 2fa to login activity

Fixes #328
This commit is contained in:
addshore 2017-05-13 17:35:33 +02:00
parent 1d0dad9e1a
commit ea051c119a
5 changed files with 106 additions and 29 deletions

View file

@ -62,6 +62,24 @@
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:passwordToggleEnabled="false"
>
<android.support.design.widget.TextInputEditText
android:id="@+id/loginTwoFactor"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/_2fa_code"
android:imeOptions="flagNoExtractUi"
android:inputType="textNoSuggestions"
android:visibility="gone"
/>
</android.support.design.widget.TextInputLayout>
<Button
android:id="@+id/loginButton"
android:layout_width="match_parent"

View file

@ -42,7 +42,7 @@
<string name="login_failed_password">Unable to login - please check your password</string>
<string name="login_failed_throttled">Too many unsuccessful attempts. Please try again in a few minutes.</string>
<string name="login_failed_blocked">Sorry, this user has been blocked on Commons</string>
<string name="login_failed_2fa_not_supported">The app doesn\'t currently support 2 Factor Authentication.</string>
<string name="login_failed_2fa_needed">You must provide your two factor authentication code.</string>
<string name="login_failed_generic">Login failed</string>
<string name="share_upload_button">Upload</string>
<string name="multiple_share_base_title">Name this set</string>
@ -173,6 +173,7 @@ Tap this message (or hit back) to skip this step.</string>
<string name="map_theme_light">mapbox://styles/mapbox/traffic-day-v2</string>
<string name="map_theme_dark">mapbox://styles/mapbox/traffic-night-v2</string>
<string name="mapbox_commons_app_token">pk.eyJ1IjoibWFza2FyYXZpdmVrIiwiYSI6ImNqMmxvdzFjMTAwMHYzM283ZWM3eW5tcDAifQ.ib5SZ9EVjwJe6GSKve0bcg</string>
<string name="_2fa_code">2FA Code</string>
<string name="number_of_uploads">My Recent Upload Limit</string>
<string name="maximum_limit">Maximum Limit</string>
<string name="maximum_limit_alert">Maximum limit should be 500</string>