Skip to content

Commit d9f58ac

Browse files
committed
feat: implement auth route to reset password
1 parent d5c3f71 commit d9f58ac

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/composables/stores/auth.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ export default {
105105
socketLogin(user)
106106
}).catch(() => {})
107107

108+
const resetPassword = (username, token, password) => authApi.resetPassword({ username, password, confirmation: password, token })
109+
.then(() => login(username, password))
110+
.catch(() => {})
111+
108112
// Reauthenticate on app init if token is present
109113
if (localStorageAuth().data.token) reauthenticate()
110114

@@ -118,7 +122,8 @@ export default {
118122
logout,
119123
register,
120124
confirmRegistration,
121-
inviteRegistration
125+
inviteRegistration,
126+
resetPassword
122127
})
123128
},
124129
render() { return this.$slots.default() } // renderless component

0 commit comments

Comments
 (0)