Skip to content

Commit

Permalink
Merge pull request #212 from silinternational/remove-smartphone-remnants
Browse files Browse the repository at this point in the history
replace smartphone with authenticator in routes, filenames, etc
  • Loading branch information
hobbitronics authored Feb 7, 2025
2 parents e125622 + e836e3b commit 999b1b6
Show file tree
Hide file tree
Showing 14 changed files with 51 additions and 51 deletions.
2 changes: 1 addition & 1 deletion src/2sv/Intro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<ButtonBar>
<v-spacer></v-spacer>

<v-btn to="/2sv/smartphone/intro" color="primary" variant="outlined">
<v-btn to="/2sv/authenticator/intro" color="primary" variant="outlined">
{{ $t('global.button.continue') }}
</v-btn>
</ButtonBar>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<ProfileWizard>
<BasePage>
<template #header>
{{ $t('2sv.smartphone.codeVerified.header') }}
{{ $t('2sv.authenticator.codeVerified.header') }}
</template>

<p class="text-center">
{{ $t('2sv.smartphone.codeVerified.info') }}
{{ $t('2sv.authenticator.codeVerified.info') }}
</p>
</BasePage>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
<ProfileWizard>
<BasePage>
<template #header>
{{ $t('2sv.smartphone.download.header') }}
{{ $t('2sv.authenticator.download.header') }}
</template>

<p>
{{ $t(`2sv.smartphone.download.recommendation-${preferredAppName}`) }}
{{ $t(`2sv.authenticator.download.recommendation-${preferredAppName}`) }}
</p>

<figure class="d-flex align-center justify-center pb-4 my-4">
<img v-if="isAuthy" :src="authy" />
<img v-else :src="authenticator" />

<figcaption class="text-h5 ml-4">
{{ $t(`2sv.smartphone.download.appname-${preferredAppName}`) }}
{{ $t(`2sv.authenticator.download.appname-${preferredAppName}`) }}
</figcaption>
</figure>

Expand All @@ -29,14 +29,14 @@
</BasePage>

<ButtonBar>
<v-btn to="/2sv/smartphone/intro" tabindex="-1" variant="outlined" class="mb-4 mb-sm-0">
<v-btn to="/2sv/authenticator/intro" tabindex="-1" variant="outlined" class="mb-4 mb-sm-0">
{{ $t('global.button.back') }}
</v-btn>

<v-spacer></v-spacer>

<v-btn to="/2sv/smartphone/scan-qr" color="primary" variant="outlined">
{{ $t('2sv.smartphone.download.button.ok') }}
<v-btn to="/2sv/authenticator/scan-qr" color="primary" variant="outlined">
{{ $t('2sv.authenticator.download.button.ok') }}
</v-btn>
</ButtonBar>
</ProfileWizard>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<ProfileWizard>
<BasePage>
<template #header>
{{ $t('2sv.smartphone.intro.header') }}
{{ $t('2sv.authenticator.intro.header') }}
</template>

<p>
{{ $t('2sv.smartphone.intro.info') }}
{{ $t('2sv.authenticator.intro.info') }}
</p>
</BasePage>

Expand All @@ -23,7 +23,7 @@
<v-btn :to="nextUrl" color="primary" tabindex="-1" variant="outlined" class="mr-2 mr-sm-4">
{{ $t('global.button.no') }}
</v-btn>
<v-btn to="/2sv/smartphone/download-app" color="primary" variant="outlined">
<v-btn to="/2sv/authenticator/download-app" color="primary" variant="outlined">
{{ $t('global.button.yes') }}
</v-btn>
</ButtonBar>
Expand All @@ -32,7 +32,7 @@

<script>
export default {
name: 'IntroSmartphone',
name: 'AuthenticatorIntro',
}
</script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
<ProfileWizard>
<BasePage>
<template #header>
{{ $t('2sv.smartphone.scanQr.header') }}
{{ $t('2sv.authenticator.scanQr.header') }}
</template>

<p class="mx-auto">
{{ $t('2sv.smartphone.scanQr.info') }}
{{ $t('2sv.authenticator.scanQr.info') }}
</p>

<ol>
<li>
<p class="pl-4">
{{ $t('2sv.smartphone.scanQr.add') }}
{{ $t('2sv.authenticator.scanQr.add') }}
</p>
</li>
<li>
<p class="d-flex flex-column pl-4">
{{ $t('2sv.smartphone.scanQr.qr') }}
{{ $t('2sv.authenticator.scanQr.qr') }}
</p>

<v-row v-if="newTotp.data" justify="center">
Expand All @@ -27,7 +27,7 @@
</v-row>
<v-row v-if="newTotp.data" justify="center">
<v-col cols="auto">
{{ $t('2sv.smartphone.scanQr.manual') }}
{{ $t('2sv.authenticator.scanQr.manual') }}
<span class="font-mono">{{ newTotp.data.totpKey }}</span>
</v-col>
</v-row>
Expand All @@ -36,19 +36,19 @@
</BasePage>

<ButtonBar>
<v-btn to="/2sv/smartphone/download-app" tabindex="-1" variant="outlined" class="mb-4 mb-sm-0">
<v-btn to="/2sv/authenticator/download-app" tabindex="-1" variant="outlined" class="mb-4 mb-sm-0">
{{ $t('global.button.back') }}
</v-btn>

<v-spacer></v-spacer>

<v-btn
:to="`/2sv/smartphone/verify-qr-code?id=${newTotp.id}`"
:to="`/2sv/authenticator/verify-qr-code?id=${newTotp.id}`"
:disabled="!newTotp.id"
color="primary"
variant="outlined"
>
{{ $t('2sv.smartphone.scanQr.button.ok') }}
{{ $t('2sv.authenticator.scanQr.button.ok') }}
</v-btn>
</ButtonBar>
</ProfileWizard>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<ProfileWizard>
<BasePage>
<template #header>
{{ $t('2sv.smartphone.verifyQrCode.header') }}
{{ $t('2sv.authenticator.verifyQrCode.header') }}
</template>

<v-row class="px-5">
<v-form ref="form" class="pl-2 d-flex flex-column align-center" @submit.prevent="verify">
<p>{{ $t('2sv.smartphone.verifyQrCode.info') }}</p>
<p>{{ $t('2sv.authenticator.verifyQrCode.info') }}</p>

<BaseTextField
v-model="code"
width="100%"
type="text"
:label="$t('2sv.smartphone.verifyQrCode.codeInput')"
:label="$t('2sv.authenticator.verifyQrCode.codeInput')"
:rules="rules"
:error-messages="errors"
validate-on-blur
Expand All @@ -26,7 +26,7 @@
</BasePage>

<ButtonBar>
<v-btn to="/2sv/smartphone/scan-qr" tabindex="-1" variant="outlined">
<v-btn to="/2sv/authenticator/scan-qr" tabindex="-1" variant="outlined">
{{ $t('global.button.back') }}
</v-btn>

Expand All @@ -51,7 +51,7 @@ export default {
code: '',
rules: [
// users may enter codes that begin with zeros or they might put a space in between digits
(v) => /^\d{3} ?\d{3}$/.test(v) || vm.$t('2sv.smartphone.verifyQrCode.invalidCode'),
(v) => /^\d{3} ?\d{3}$/.test(v) || vm.$t('2sv.authenticator.verifyQrCode.invalidCode'),
],
errors: [],
}),
Expand All @@ -63,10 +63,10 @@ export default {
try {
await verify(this.$route.query.id, this.code.trim())
this.$router.push('/2sv/smartphone/code-verified')
this.$router.push('/2sv/authenticator/code-verified')
} catch (error) {
if (error.status == 400) {
this.errors.push(this.$t('2sv.smartphone.verifyQrCode.hint'))
this.errors.push(this.$t('2sv.authenticator.verifyQrCode.hint'))
}
}
} else {
Expand Down
22 changes: 11 additions & 11 deletions src/2sv/routes.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Intro from './Intro.vue'
import SmartphoneIntro from './smartphone/Intro.vue'
import DownloadApp from './smartphone/DownloadApp.vue'
import ScanQr from './smartphone/ScanQr.vue'
import VerifyQrCode from './smartphone/VerifyQrCode.vue'
import CodeVerified from './smartphone/CodeVerified.vue'
import AuthenticatorIntro from './authenticator/Intro.vue'
import DownloadApp from './authenticator/DownloadApp.vue'
import ScanQr from './authenticator/ScanQr.vue'
import VerifyQrCode from './authenticator/VerifyQrCode.vue'
import CodeVerified from './authenticator/CodeVerified.vue'
import KeyIntro from './key/Intro.vue'
import Insert from './key/Insert.vue'
import Touch from './key/Touch.vue'
Expand Down Expand Up @@ -32,35 +32,35 @@ export default [
redirect: '/2sv/intro',
},
{
path: '/2sv/smartphone/intro',
component: SmartphoneIntro,
path: '/2sv/authenticator/intro',
component: AuthenticatorIntro,
beforeEnter: (to, from, next) => {
skipWhen(mfa.totp.id, '/2sv/usb-security-key/intro', next)
},
},
{
path: '/2sv/smartphone/download-app',
path: '/2sv/authenticator/download-app',
component: DownloadApp,
beforeEnter: (to, from, next) => {
skipWhen(mfa.totp.id, '/2sv/usb-security-key/intro', next)
},
},
{
path: '/2sv/smartphone/scan-qr',
path: '/2sv/authenticator/scan-qr',
component: ScanQr,
beforeEnter: (to, from, next) => {
skipWhen(mfa.totp.id, '/2sv/usb-security-key/intro', next)
},
},
{
path: '/2sv/smartphone/verify-qr-code',
path: '/2sv/authenticator/verify-qr-code',
component: VerifyQrCode,
beforeEnter: (to, from, next) => {
skipWhen(mfa.totp.id, '/2sv/usb-security-key/intro', next)
},
},
{
path: '/2sv/smartphone/code-verified',
path: '/2sv/authenticator/code-verified',
component: CodeVerified,
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@
"info": "Before we go any further, we would like to introduce an important step in protecting your account.",
"incentive": "Adding 2-Step Verification to your account will at least double the lifespan of your password! Imagine not having to change your password every year anymore... Check the profile page after adding a 2SV to see what your new expiration will be."
},
"smartphone": {
"authenticator": {
"intro": {
"header": "Do you have an authenticator app?",
"info": "If you have one and it is usually with you, this can be a very good option for your 2-Step Verification."
Expand Down
4 changes: 2 additions & 2 deletions src/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@
"info": "Antes de continuar, nos gustaría presentar un paso importante para proteger su cuenta.",
"incentive": "¡Agregar la verificación de 2 pasos a su cuenta duplicará al menos la vida útil de su contraseña! Piensalo: que ya no tiene que cambiar su contraseña cada año... Verifique la página del perfil después de agregar un verificacion de dos pasos para ver cuál será su nueva caducidad."
},
"smartphone": {
"authenticator": {
"intro": {
"header": "¿Tienes una aplicación de autenticación?",
"info": "Si tiene una aplicación de autenticación y normalmente está con usted, esta puede ser una muy buena opción para su verificación de 2 pasos."
Expand All @@ -239,7 +239,7 @@
"recommendation-authenticator": "Hay muchas aplicaciones que puede usar para este paso, sin embargo, recomendamos Google Authenticator por su simplicidad. Es gratis y no utilizará ningún dato móvil.",
"recommendation-authy": "Hay varias aplicaciones de autenticación disponibles, pero Authy es la opción recomendada. Authy es gratis y no utiliza ningún dato móvil.",
"button": {
"ok": "OK, lo instalé en mi smartphone"
"ok": "OK, instalé mi aplicación de autenticación"
},
"appname-authenticator": "Autenticación de Google",
"appname-authy": "Authy"
Expand Down
2 changes: 1 addition & 1 deletion src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@
"info": "Avant d'aller plus loin, nous souhaitons introduire une étape importante dans la protection de votre compte.",
"incentive": "L'ajout d'une vérification en deux étapes à votre compte doublera au moins la durée de vie de votre mot de passe! Imaginez ne plus avoir à changer votre mot de passe chaque année ... Consultez la page de profil après avoir ajouté un 2SV pour voir quelle sera votre nouvelle date d'expiration."
},
"smartphone": {
"authenticator": {
"intro": {
"header": "Avez-vous une application d'authentification?",
"info": "Si vous en avez un et que c'est généralement avec vous, cela peut être une très bonne option pour votre vérification en deux étapes."
Expand Down
2 changes: 1 addition & 1 deletion src/locales/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@
"info": "더 나아 가기 전에 귀하의 계정을 보호하는 중요한 단계를 소개하고자합니다.",
"incentive": "계정에 2 단계 인증을 추가하면 비밀번호 수명이 2 배 이상 길어집니다. 2단계 인증후 매년 암호를 변경하지 않아도 됩니다. 2SV를 추가 한 후 프로필 페이지에서 새 만료일을 확인하십시오."
},
"smartphone": {
"authenticator": {
"intro": {
"header": "인증 앱 있으십니까?",
"info": "만약 가지고있는 경우, 이것은 2 단계 인증에 매우 좋은 옵션입니다."
Expand Down
2 changes: 1 addition & 1 deletion src/profile/ProfileProgress.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<a v-if="complete < 1 && !profile.alternates.length" href="#/password/recovery">{{
$t('profile.progress.addMethod')
}}</a>
<a v-if="complete < 1 && !profile.mfa.totp.id" href="#/2sv/smartphone/intro">{{
<a v-if="complete < 1 && !profile.mfa.totp.id" href="#/2sv/authenticator/intro">{{
$t('profile.progress.addTotp')
}}</a>
<a v-if="complete < 1 && !(profile.mfa.u2f.id || profile.mfa.keys.id)" href="#/2sv/usb-security-key/intro">{{
Expand Down
2 changes: 1 addition & 1 deletion src/profile/TotpCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<v-btn v-if="meta.created_utc" :href="`#/2sv/change/${meta.id}`" color="primary" variant="outlined">
{{ $t('profile.index.totpCard.button.change') }}
</v-btn>
<v-btn v-else href="#/2sv/smartphone/intro" color="primary" variant="outlined">
<v-btn v-else href="#/2sv/authenticator/intro" color="primary" variant="outlined">
{{ $t('global.button.add') }}
</v-btn>
<MfaCardRemove v-if="meta.created_utc" :mfa-id="String(meta.id)" />
Expand Down
10 changes: 5 additions & 5 deletions src/profile/steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ const totp = {
nameKey: 'profile.steps.authenticator',
paths: [
'/2sv/intro',
'/2sv/smartphone/intro',
'/2sv/smartphone/download-app',
'/2sv/smartphone/scan-qr',
'/2sv/smartphone/verify-qr-code',
'/2sv/smartphone/code-verified',
'/2sv/authenticator/intro',
'/2sv/authenticator/download-app',
'/2sv/authenticator/scan-qr',
'/2sv/authenticator/verify-qr-code',
'/2sv/authenticator/code-verified',
],
isRelevant(user, recoveryMethods, mfa) {
return user.auth_type === 'login' && (isRequested(this.paths) || (!mfa.totp?.id && mfa.numVerified < 3))
Expand Down

0 comments on commit 999b1b6

Please sign in to comment.