ViewResetPassword
Overview
Default reset password view, the page a password reset email links to. Checks the link, then asks for a new password and its confirmation inside an AuthorizingForm card.
The emailed link carries the account's pk in its path and the token in its query, so a route passes both as props, for example /reset-password/:pk with props: (route) => ({ pk: route.params.pk, token: route.query.token }). A link the server rejects shows the invalid-message slot instead of the form. After a successful reset the view goes to signInTo.
Replace pieces through the field(password), widget(password), field(password_confirm), widget(password_confirm), action-bar, and invalid-message slots; any other AuthorizingForm or ActionForm slot is forwarded through.
Props
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| pk | string | yes | The account identifier from the reset link's path. | |
| token | string | yes | The reset token from the reset link's query string. | |
| signInTo | string|object | () => ({ name: "sign-in" }) | Route location to go to after a successful reset, and for the "Sign in" link. | |
| forgotPasswordTo | string|object | () => ({ name: "forgot-password" }) | Route location for requesting a new link when this one is invalid. |
Slots
| Name | Scoped | Description |
|---|---|---|
auth-form-prefix-header | ||
auth-form-inner | yes | |
header | yes | |
content | yes | |
suffix | ||
invalid-message | ||
field(password) | yes | |
widget(password) | yes | |
field(password_confirm) | yes | |
widget(password_confirm) | yes | |
action-bar | yes |
Events
| Name | Description |
|---|---|
form-object | Emitted on mount with a readonly ref to the reactive form values object. |
form-context | Emitted on mount with the form context. Use its methods for programmatic form updates. |
Source
client/lib/views/ViewResetPassword.vue