Skip to content

Instantly share code, notes, and snippets.

@abrarShariar
Created March 12, 2020 06:46
Show Gist options
  • Save abrarShariar/533536b0b613f6eb7d08b43f133cfe54 to your computer and use it in GitHub Desktop.
Save abrarShariar/533536b0b613f6eb7d08b43f133cfe54 to your computer and use it in GitHub Desktop.
Authenticate function body
try {
await this.$auth.loginWith('local', { data: this.user })
// some other line of code that shows loading msgs
// ...
this.$router.push(this.localePath({ path: 'dashboard' }))
} catch (e) {
// handling error
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment