From 5dc6a0d541865e31416ac1d3445a4c1c95b32ca3 Mon Sep 17 00:00:00 2001 From: Shaun Ellis Date: Thu, 31 May 2018 17:00:59 -0400 Subject: [PATCH] fixes login --- src/pages/login.vue | 4 +++- src/store/index.js | 25 +++++++++++-------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/pages/login.vue b/src/pages/login.vue index 6c7c10b..6532da3 100644 --- a/src/pages/login.vue +++ b/src/pages/login.vue @@ -32,7 +32,7 @@ // //alert("Trying to sign in"); // } }, - signInSuccessUrl: 'http://localhost:8080/hello', + // signInSuccessUrl: '/hello', signInOptions: [ this.$firebase.auth.GoogleAuthProvider.PROVIDER_ID, this.$firebase.auth.EmailAuthProvider.PROVIDER_ID @@ -43,7 +43,9 @@ }, methods: { sendToStore(user) { + console.log(user) this.$store.dispatch('setUser', user); //|| false) + this.$router.push('/hello') } } } diff --git a/src/store/index.js b/src/store/index.js index a56321d..6ae2c41 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -17,22 +17,22 @@ const initialState = { userTagList: {} } -//const state = Object.assign({}, initialState) +const state = Object.assign({}, initialState) -const state = { - user: {}, - lastPOI: {}, - profile: {}, - simplePoints: 10, - tagPoints: 50, - flagToSpamThreshold: 1, - userTagList: {} -} +// const state = { +// user: {}, +// lastPOI: {}, +// profile: {}, +// simplePoints: 10, +// tagPoints: 50, +// flagToSpamThreshold: 1, +// userTagList: {} +// } const mutations = { SET_USER (state, user) { state.user = user - console.log("Mutation User: " + user.displayName) + console.log("Mutation User: " + state.user.displayName) }, SET_PROFILE (state, profile) { state.profile = profile @@ -100,6 +100,3 @@ const store = new Vuex.Store({ }) export default store - - -