diff --git a/webapp/components/PasswordReset/ChangePassword.spec.js b/webapp/components/PasswordReset/ChangePassword.spec.js
index a6722f016..e93d5d00d 100644
--- a/webapp/components/PasswordReset/ChangePassword.spec.js
+++ b/webapp/components/PasswordReset/ChangePassword.spec.js
@@ -39,10 +39,10 @@ describe('ChangePassword ', () => {
})
}
- describe('given email and verification code', () => {
+ describe('given email and verification nonce', () => {
beforeEach(() => {
propsData.email = 'mail@example.org'
- propsData.code = '123456'
+ propsData.nonce = '123456'
})
describe('submitting new password', () => {
@@ -59,14 +59,14 @@ describe('ChangePassword ', () => {
it('delivers new password to backend', () => {
const expected = expect.objectContaining({
- variables: { code: '123456', email: 'mail@example.org', password: 'supersecret' },
+ variables: { nonce: '123456', email: 'mail@example.org', password: 'supersecret' },
})
expect(mocks.$apollo.mutate).toHaveBeenCalledWith(expected)
})
describe('password reset successful', () => {
it('displays success message', () => {
- const expected = 'verify-code.form.change-password.success'
+ const expected = 'verify-nonce.form.change-password.success'
expect(mocks.$t).toHaveBeenCalledWith(expected)
})
diff --git a/webapp/components/PasswordReset/ChangePassword.vue b/webapp/components/PasswordReset/ChangePassword.vue
index f59edffa1..3de4f048a 100644
--- a/webapp/components/PasswordReset/ChangePassword.vue
+++ b/webapp/components/PasswordReset/ChangePassword.vue
@@ -1,5 +1,5 @@
-
+
- {{ $t(`verify-code.form.change-password.success`) }}
+ {{ $t(`verify-nonce.form.change-password.success`) }}
- {{ $t(`verify-code.form.change-password.error`) }}
- {{ $t('verify-code.form.change-password.help') }}
+ {{ $t(`verify-nonce.form.change-password.error`) }}
+ {{ $t('verify-nonce.form.change-password.help') }}
support@human-connection.org
@@ -64,7 +64,7 @@ export default {
},
props: {
email: { type: String, required: true },
- code: { type: String, required: true },
+ nonce: { type: String, required: true },
},
data() {
const passwordForm = PasswordForm({ translate: this.$t })
@@ -82,13 +82,13 @@ export default {
methods: {
async handleSubmitPassword() {
const mutation = gql`
- mutation($code: String!, $email: String!, $password: String!) {
- resetPassword(code: $code, email: $email, newPassword: $password)
+ mutation($nonce: String!, $email: String!, $password: String!) {
+ resetPassword(nonce: $nonce, email: $email, newPassword: $password)
}
`
const { password } = this.formData
- const { email, code } = this
- const variables = { password, email, code }
+ const { email, nonce } = this
+ const variables = { password, email, nonce }
try {
const {
data: { resetPassword },
diff --git a/webapp/components/PasswordReset/VerifyCode.spec.js b/webapp/components/PasswordReset/VerifyNonce.spec.js
similarity index 62%
rename from webapp/components/PasswordReset/VerifyCode.spec.js
rename to webapp/components/PasswordReset/VerifyNonce.spec.js
index 22cdfd885..ebe552f0d 100644
--- a/webapp/components/PasswordReset/VerifyCode.spec.js
+++ b/webapp/components/PasswordReset/VerifyNonce.spec.js
@@ -1,12 +1,12 @@
import { mount, createLocalVue } from '@vue/test-utils'
-import VerifyCode from './VerifyCode'
+import VerifyNonce from './VerifyNonce.vue'
import Styleguide from '@human-connection/styleguide'
const localVue = createLocalVue()
localVue.use(Styleguide)
-describe('VerifyCode ', () => {
+describe('VerifyNonce ', () => {
let wrapper
let Wrapper
let mocks
@@ -25,27 +25,27 @@ describe('VerifyCode ', () => {
beforeEach(jest.useFakeTimers)
Wrapper = () => {
- return mount(VerifyCode, {
+ return mount(VerifyNonce, {
mocks,
localVue,
propsData,
})
}
- it('renders a verify code form', () => {
+ it('renders a verify nonce form', () => {
wrapper = Wrapper()
- expect(wrapper.find('.verify-code').exists()).toBe(true)
+ expect(wrapper.find('.verify-nonce').exists()).toBe(true)
})
- describe('after verification code given', () => {
+ describe('after verification nonce given', () => {
beforeEach(() => {
wrapper = Wrapper()
- wrapper.find('input#code').setValue('123456')
+ wrapper.find('input#nonce').setValue('123456')
wrapper.find('form').trigger('submit')
})
- it('emits `verifyCode`', () => {
- const expected = [[{ code: '123456', email: 'mail@example.org' }]]
+ it('emits `verification`', () => {
+ const expected = [[{ nonce: '123456', email: 'mail@example.org' }]]
expect(wrapper.emitted('verification')).toEqual(expected)
})
})
diff --git a/webapp/components/PasswordReset/VerifyCode.vue b/webapp/components/PasswordReset/VerifyNonce.vue
similarity index 70%
rename from webapp/components/PasswordReset/VerifyCode.vue
rename to webapp/components/PasswordReset/VerifyNonce.vue
index de1495e36..94ae13564 100644
--- a/webapp/components/PasswordReset/VerifyCode.vue
+++ b/webapp/components/PasswordReset/VerifyNonce.vue
@@ -1,5 +1,5 @@
-
+
- {{ $t('verify-code.form.description') }}
+ {{ $t('verify-nonce.form.description') }}
- {{ $t('verify-code.form.next') }}
+ {{ $t('verify-nonce.form.next') }}
@@ -36,15 +36,15 @@ export default {
data() {
return {
formData: {
- code: '',
+ nonce: '',
},
formSchema: {
- code: {
+ nonce: {
type: 'string',
min: 6,
max: 6,
required: true,
- message: this.$t('common.validations.verification-code'),
+ message: this.$t('common.validations.verification-nonce'),
},
},
disabled: true,
@@ -58,9 +58,9 @@ export default {
this.disabled = false
},
handleSubmitVerify() {
- const { code } = this.formData
+ const { nonce } = this.formData
const email = this.email
- this.$emit('verification', { email, code })
+ this.$emit('verification', { email, nonce })
},
},
}
diff --git a/webapp/locales/de.json b/webapp/locales/de.json
index 0d283f8af..a28baa2f9 100644
--- a/webapp/locales/de.json
+++ b/webapp/locales/de.json
@@ -82,9 +82,9 @@
"success": "Dein Benutzerkonto wurde erstellt!"
}
},
- "verify-code": {
+ "verify-nonce": {
"form": {
- "code": "Code eingeben",
+ "nonce": "Code eingeben",
"description": "Öffne dein E-Mail Postfach und gib den Code ein, den wir geschickt haben.",
"next": "Weiter",
"change-password": {
@@ -342,7 +342,7 @@
"validations": {
"email": "muss eine gültige E-Mail Adresse sein",
"url": "muss eine gültige URL sein",
- "verification-code": "muss genau 6 Buchstaben lang sein"
+ "verification-nonce": "muss genau 6 Buchstaben lang sein"
}
},
"actions": {
diff --git a/webapp/locales/en.json b/webapp/locales/en.json
index b1283c9b2..e08f7bdad 100644
--- a/webapp/locales/en.json
+++ b/webapp/locales/en.json
@@ -82,9 +82,9 @@
"success": "Your account has been created!"
}
},
- "verify-code": {
+ "verify-nonce": {
"form": {
- "code": "Enter your code",
+ "nonce": "Enter your code",
"description": "Open your inbox and enter the code that we've sent to you.",
"next": "Continue",
"change-password": {
@@ -342,7 +342,7 @@
"validations": {
"email": "must be a valid email address",
"url": "must be a valid URL",
- "verification-code": "must be 6 characters long"
+ "verification-nonce": "must be 6 characters long"
}
},
"actions": {
diff --git a/webapp/locales/pl.json b/webapp/locales/pl.json
index ed5f049ab..f6880e157 100644
--- a/webapp/locales/pl.json
+++ b/webapp/locales/pl.json
@@ -37,9 +37,9 @@
"submitted": "Na adres {email} została wysłana wiadomość z dalszymi instrukcjami."
}
},
- "verify-code": {
+ "verify-nonce": {
"form": {
- "code": "Wprowadź swój kod",
+ "nonce": "Wprowadź swój kod",
"description": "Otwórz swoją skrzynkę odbiorczą i wpisz kod, który do Ciebie wysłaliśmy.",
"next": "Kontynuuj",
"change-password": {
@@ -237,7 +237,7 @@
"reportContent": "Sprawozdanie",
"validations": {
"email": "musi być ważny adres e-mail.",
- "verification-code": "musi mieć długość 6 znaków."
+ "verification-nonce": "musi mieć długość 6 znaków."
}
},
"actions": {
diff --git a/webapp/nuxt.config.js b/webapp/nuxt.config.js
index 9a0839058..f4287da1c 100644
--- a/webapp/nuxt.config.js
+++ b/webapp/nuxt.config.js
@@ -35,11 +35,11 @@ module.exports = {
'login',
'logout',
'password-reset-request',
- 'password-reset-verify-code',
+ 'password-reset-verify-nonce',
'password-reset-change-password',
- // 'registration-signup', TODO: uncomment to open public registration
- 'registration-signup-by-invitation-code',
- 'registration-verify-code',
+ // 'registration-signup', TODO: implement to open public registration
+ // 'registration-signup-by-invitation-code',
+ // 'registration-verify-nonce',
'registration-create-user-account',
'pages-slug',
'imprint',
diff --git a/webapp/pages/password-reset/change-password.vue b/webapp/pages/password-reset/change-password.vue
index 12ccc192a..7ab124782 100644
--- a/webapp/pages/password-reset/change-password.vue
+++ b/webapp/pages/password-reset/change-password.vue
@@ -1,7 +1,7 @@
@@ -11,8 +11,8 @@ import ChangePassword from '~/components/PasswordReset/ChangePassword'
export default {
data() {
- const { email = '', code = '' } = this.$route.query
- return { email, code }
+ const { email = '', nonce = '' } = this.$route.query
+ return { email, nonce }
},
components: {
ChangePassword,
diff --git a/webapp/pages/password-reset/request.vue b/webapp/pages/password-reset/request.vue
index b7e5fe21a..aa1b1ef05 100644
--- a/webapp/pages/password-reset/request.vue
+++ b/webapp/pages/password-reset/request.vue
@@ -11,7 +11,7 @@ export default {
},
methods: {
handlePasswordResetRequested({ email }) {
- this.$router.push({ path: 'verify-code', query: { email } })
+ this.$router.push({ path: 'verify-nonce', query: { email } })
},
},
}
diff --git a/webapp/pages/password-reset/verify-code.vue b/webapp/pages/password-reset/verify-nonce.vue
similarity index 55%
rename from webapp/pages/password-reset/verify-code.vue
rename to webapp/pages/password-reset/verify-nonce.vue
index c814ea9ba..728eadf4c 100644
--- a/webapp/pages/password-reset/verify-code.vue
+++ b/webapp/pages/password-reset/verify-nonce.vue
@@ -1,21 +1,21 @@
-
+