Skip to content

Commit

Permalink
Merge pull request #49 from jac-uk/feature/29-incorrect-error-msg
Browse files Browse the repository at this point in the history
Add call to sign out user if they encounter an error, to clear state
  • Loading branch information
YaaL committed Jul 29, 2020
2 parents 3827167 + d99e58a commit 1689417
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/components/LoadingMessage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,19 @@
</template>

<script>
import { auth } from '@/firebase';
export default {
props: {
loadFailed: Boolean,
},
watch: {
loadFailed: function(newVal) {
if(newVal == true){
// If we fail to load, log the user out
auth().signOut();
}
},
},
};
</script>

Expand Down

0 comments on commit 1689417

Please sign in to comment.