Logged users out if they were logged in with facebook (#10322)

This commit is contained in:
Keith Holliday
2018-05-03 13:00:50 -05:00
committed by GitHub
parent c1ed02d383
commit 5e6541faa6
3 changed files with 16 additions and 0 deletions

View File

@@ -105,7 +105,12 @@ export default {
}); });
}, },
methods: { methods: {
// @TODO: Abstract hello in to action or lib
async socialAuth (network) { async socialAuth (network) {
try {
await hello(network).logout();
} catch (e) {} // eslint-disable-line
try { try {
let auth = await hello(network).login({ let auth = await hello(network).login({
scope: 'email', scope: 'email',

View File

@@ -427,7 +427,12 @@ export default {
// ALSO it's the only way to make sure language data is reloaded and correct for the logged in user // ALSO it's the only way to make sure language data is reloaded and correct for the logged in user
window.location.href = redirectTo; window.location.href = redirectTo;
}, },
// @TODO: Abstract hello in to action or lib
async socialAuth (network) { async socialAuth (network) {
try {
await hello(network).logout();
} catch (e) {} // eslint-disable-line
const url = window.location.href; const url = window.location.href;
let auth = await hello(network).login({ let auth = await hello(network).login({

View File

@@ -652,7 +652,13 @@
}); });
this.$router.push('/register'); this.$router.push('/register');
}, },
// @TODO: Abstract hello in to action or lib
async socialAuth (network) { async socialAuth (network) {
try {
await hello(network).logout();
} catch (e) {} // eslint-disable-line
const url = window.location.href; const url = window.location.href;
let auth = await hello(network).login({ let auth = await hello(network).login({