Skip to content

Commit

Permalink
feat: implement auth route to reset password
Browse files Browse the repository at this point in the history
  • Loading branch information
akinsey committed Feb 11, 2022
1 parent d5c3f71 commit d9f58ac
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/composables/stores/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ export default {
socketLogin(user)
}).catch(() => {})

const resetPassword = (username, token, password) => authApi.resetPassword({ username, password, confirmation: password, token })
.then(() => login(username, password))
.catch(() => {})

// Reauthenticate on app init if token is present
if (localStorageAuth().data.token) reauthenticate()

Expand All @@ -118,7 +122,8 @@ export default {
logout,
register,
confirmRegistration,
inviteRegistration
inviteRegistration,
resetPassword
})
},
render() { return this.$slots.default() } // renderless component
Expand Down

0 comments on commit d9f58ac

Please sign in to comment.