mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-05-24 22:55:50 +00:00
possible fix for facebook auth bug
This commit is contained in:
parent
84b16f28c2
commit
e3ce1c5322
1 changed files with 15 additions and 8 deletions
|
|
@ -106,16 +106,23 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
async socialAuth (network) {
|
||||
let auth = await hello(network).login({
|
||||
scope: 'email',
|
||||
redirect_uri: '', // eslint-disable-line camelcase
|
||||
});
|
||||
try {
|
||||
let auth = await hello(network).login({
|
||||
scope: 'email',
|
||||
redirect_uri: '', // eslint-disable-line camelcase
|
||||
});
|
||||
|
||||
await this.$store.dispatch('auth:socialAuth', {
|
||||
auth,
|
||||
});
|
||||
await this.$store.dispatch('auth:socialAuth', {
|
||||
auth,
|
||||
});
|
||||
|
||||
await this.finishAuth();
|
||||
await this.finishAuth();
|
||||
} catch (err) {
|
||||
console.error(err); // eslint-disable-line no-console
|
||||
// logout the user
|
||||
await hello(network).logout();
|
||||
this.socialAuth(network); // login again
|
||||
}
|
||||
},
|
||||
async register () {
|
||||
if (!this.email) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue