ember.js - torii facebook ember get user and name -
hi want name , email facebook authentication via torii , simple-auth, don't know how recovery data. can login via facebook can't name or email.
could helpme please
this code:
//import base 'ember-simple-auth/authenticators/base'; import ember 'ember'; import toriiauthenticator 'ember-simple-auth/authenticators/torii'; export default toriiauthenticator.extend({ torii: ember.inject.service() });
this component login-form
import ember 'ember'; export default ember.component.extend({ actions:{ facebooklogin(){ this.get('session').authenticate('authenticator:torii', 'facebook-oauth2').then((data)=>{ alert("logueado" + data); }); } } });
and torii-provider
// app/torii-providers/facebook.js import facebookoauth2provider 'torii/providers/facebook-oauth2'; export default facebookoauth2provider.extend({ fetch(data) { return data; } });
Comments
Post a Comment