Skip to content

Instantly share code, notes, and snippets.

@tajuszk
Created October 22, 2019 07:59
Show Gist options
  • Save tajuszk/6d85c40e8681cebeea1e57b54fd8cb7f to your computer and use it in GitHub Desktop.
Save tajuszk/6d85c40e8681cebeea1e57b54fd8cb7f to your computer and use it in GitHub Desktop.
<template>
<div>
<button type="button" @click="doLogout">ログアウト</button>
</div>
</template>
<script>
// firebase モジュール
import firebase from 'firebase';
export default {
name: 'Home',
methods: {
// ログアウト処理
doLogout() {
firebase.auth().signOut()
// ログアウトされている状態でページをリロードすると
// routerに記載した情報を元にページ遷移する
location.reload();
},
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment