Skip to content

Commit

Permalink
fix(local scheme): call '$auth.reset'
Browse files Browse the repository at this point in the history
Because core 'reset' method has error handling
  • Loading branch information
JoaoPedroAS51 committed Mar 3, 2020
1 parent fed48c6 commit 08182bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/schemes/local.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default class LocalScheme {
}

// Ditch any leftover local tokens before attempting to log in
await this.reset()
await this.$auth.reset()

const result = await this.$auth.request(
endpoint,
Expand Down Expand Up @@ -93,8 +93,8 @@ export default class LocalScheme {
.catch(() => { })
}

// But logout locally regardless
return this.reset()
// But reset regardless
return this.$auth.reset()
}

async reset () {
Expand Down

1 comment on commit 08182bf

@JoaoPedroAS51
Copy link
Collaborator Author

@JoaoPedroAS51 JoaoPedroAS51 commented on 08182bf Mar 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pi0 Should I revert this commit? logoutLocally wasn't handling errors, do we need to handle reset errors?

Please sign in to comment.