ember.js - Torii Configuration is not being loaded in ember cli -


i'm having lot of trouble getting ember simple auth torii working @ @ moment using ember cli.

after creating new ember cli app , installing torii, ember-cli-simple-auth , ember-cli-simple-auth-torii, have couple of buttons on login page

here contents of routes/login.js:

import ember 'ember';  export default ember.route.extend({   actions: {     googlelogin: function() {       this.get('session').authenticate('simple-auth-authenticator:torii', 'google-oauth2');       return;     },     facebooklogin: function() {       this.get('session').authenticate('simple-auth-authenticator:torii', 'facebook-oauth2');       return;     }   } }); 

the relevant part of environment.js file is:

var env = {  ... torii: {   providers: {     'google-oauth2': {       apikey: 'api-key-here',       scope: 'profile',       redirecturi: 'http://localhost:4200'     },     'facebook-oauth2': {       apikey:      'api-key-here',       redirecturi: 'http://localhost:4200'     }   } }, ... }; 

when hit actions in login.js, following error:

error: expected configuration value providers.facebook-oauth2.apikey defined! 

or

error: expected configuration value providers.google-oauth2.apikey defined! 

why torii not picking environment.js configuration?

you need create app in facebook , google, api key , place says: apikey: 'api-key-here' in environment.js


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -