mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
Logged users out if they were logged in with facebook (#10322)
This commit is contained in:
@@ -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',
|
||||||
|
|||||||
@@ -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({
|
||||||
|
|||||||
@@ -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({
|
||||||
|
|||||||
Reference in New Issue
Block a user