Skip to content

Commit

Permalink
chore: add logout handler in vue example
Browse files Browse the repository at this point in the history
  • Loading branch information
ayZagen committed Oct 6, 2020
1 parent bdd75bf commit d3821db
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/vue/src/components/AppHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ export default {
this.$auth.on('user_login', ({ user }) => {
this.user = user
})
this.$auth.on('user_logout', () => {
this.user = null
})
this.user = await this.$auth.getUser()
}
}
Expand Down

0 comments on commit d3821db

Please sign in to comment.