Emberjs + passportJS google


#1

Hi, i am new to emberjs and passport js google oauth2. I am trying to create a authentication with an third party app like google to handle my password. So far, i’ve tested my backend (nodejs) and it persist the data user. My issue is that, how can i transfer my data (user data) to the front-end(emberjs) on the callback url (/auth/google/callback). My second issue, can someone explain to me how to make a simple ajax call with ember? i’ve created an adapter and i want to make the ajax call in my controller…

my adapter

import Ember from 'ember';
import DS from 'ember-data';
import config from '../config/environment';

export default DS.RESTAdapter.extend({
  host: config.url
});

my control ler

import Component from '@ember/component';

export default Component.extend({

actions: {
      googleClicked: function() {
        console.log("google clicked")
        //step 1
        //ember g storage user -a -s
        //step 2
       //call ajax

      // return this.store.find('');

     },
     fbClicked: function() {
        console.log("facebook click");
      }
   }
});

my nodejs route