Ariel Molina
Ariel Molina
That has the unfortunate side effect of duplicating the `getLoginStatus()` call , as it has been already called in `async created()`.
Yes but I need the payload to synchronize the login status to my own REST API. I can sync on `@login` and get my own API token, which I save....
Not FB, but the component. As FB does they always provide the response, no third parameters. I think the component should always provide the paramenter too. And if you want...
In short, `this.$emit({ ...response, initial: true })` just as you said
Both the "initial" login `res` payload and the re-login `res` should be identical in order to sync any backends without data reformatting. But I _think_, the FB payload has that...
FB docs require you to re-check the token on a backend server in order to convert it to a long living token (for Graph API and other stuff). So we...
> why do you need to resend a short lived token using an init event? I dont.
I would only need this line https://github.com/adi518/vue-facebook-login-component/blob/f42d8cfce96feea3b2c3e19952ce972533cb2066/packages/vue-facebook-login-component/src/components/Scope.js#L50 To be exactly as this: https://github.com/adi518/vue-facebook-login-component/blob/f42d8cfce96feea3b2c3e19952ce972533cb2066/packages/vue-facebook-login-component/src/components/Scope.js#L98
If there is no payload, everybody needs to do a double request in order to get user info. So beyond semantics, there is pragmatism, and sending the payload `this.$emit('login', status)`...
I think you are overthinking this. Just do what FB does, and send the `res`, this component is just hiding it, I don't see why it should hide it. `this.$emit('login',...