Skip to content

Commit

Permalink
Fix #113 - Fix password reset route & Add a Continue button
Browse files Browse the repository at this point in the history
  • Loading branch information
Bubka committed Aug 10, 2022
1 parent fbb8534 commit 85e34c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion resources/js/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const router = new Router({
{ path: '/register', name: 'register', component: Register, meta: { disabledWithAuthProxy: true, showAbout: true } },
{ path: '/autolock', name: 'autolock',component: Autolock, meta: { disabledWithAuthProxy: true, showAbout: true } },
{ path: '/password/request', name: 'password.request', component: PasswordRequest, meta: { disabledWithAuthProxy: true, showAbout: true } },
{ path: '/password/reset/:token', name: 'password.reset', component: PasswordReset, meta: { disabledWithAuthProxy: true, showAbout: true } },
{ path: '/user/password/reset', name: 'password.reset', component: PasswordReset, meta: { disabledWithAuthProxy: true, showAbout: true } },
{ path: '/webauthn/lost', name: 'webauthn.lost', component: WebauthnLost, meta: { disabledWithAuthProxy: true, showAbout: true } },
{ path: '/webauthn/recover', name: 'webauthn.recover', component: WebauthnRecover, meta: { disabledWithAuthProxy: true, showAbout: true } },

Expand Down
11 changes: 6 additions & 5 deletions resources/js/views/auth/password/Reset.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
<form-field :form="form" fieldName="email" inputType="email" :label="$t('auth.forms.email')" disabled readonly />
<form-field :form="form" fieldName="password" inputType="password" :label="$t('auth.forms.new_password')" />
<form-field :form="form" fieldName="password_confirmation" inputType="password" :label="$t('auth.forms.confirm_password')" />
<form-buttons :isBusy="form.isBusy" :caption="$t('auth.forms.change_password')" :showCancelButton="true" cancelLandingView="login" />
<form-buttons v-if="pending" :isBusy="form.isBusy" :caption="$t('auth.forms.change_password')" :showCancelButton="true" cancelLandingView="login" />
<router-link v-if="!pending" id="btnContinue" :to="{ name: 'accounts' }" class="button is-link">{{ $t('commons.continue') }}</router-link>
</form>
<!-- footer -->
<vue-footer></vue-footer>
Expand All @@ -18,8 +19,7 @@
export default {
data(){
return {
success: '',
fail: '',
pending: true,
form: new Form({
email : '',
password : '',
Expand All @@ -31,7 +31,7 @@
created () {
this.form.email = this.$route.query.email
this.form.token = this.$route.params.token
this.form.token = this.$route.query.token
},
methods : {
Expand All @@ -40,8 +40,9 @@
this.form.post('/user/password/reset', {returnError: true})
.then(response => {
this.pending = false
this.$notify({ type: 'is-success', text: response.data.message, duration:-1 })
})
.catch(error => {
if( error.response.data.resetFailed ) {
Expand Down

0 comments on commit 85e34c6

Please sign in to comment.