Created
October 22, 2019 07:59
-
-
Save tajuszk/6d85c40e8681cebeea1e57b54fd8cb7f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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