I'm very new to 3rd party authentication and have not been able to make an API request to LinkedIn through the ember-cli-simple-auth addon paired with simple-auth-oauth2. My environment.js is below, where I've tried to piece together parts from Simple Labs' introduction1 and http://ift.tt/18rcHfM, specifically at the bottom of where environment === 'test'. I don't get any errors after building the CLI project but I do get a notification in the browser's console (not warning or error) that says:
No authorizer was configured for Ember Simple Auth - specify one if backend requests need to be authorized.
Environment.js:
// config/environment.js
/* jshint node: true */
module.exports = function(environment) {
var ENV = {
modulePrefix: 'seminars-me',
environment: environment,
baseURL: '/',
locationType: 'auto',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-controller': true
}
},
APP: {
// Here you can pass flags/options to your application instance
// when it is created
}
};
if (environment === 'development') {
// ENV.APP.LOG_RESOLVER = true;
// ENV.APP.LOG_ACTIVE_GENERATION = true;
// ENV.APP.LOG_TRANSITIONS = true;
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
// ENV.APP.LOG_VIEW_LOOKUPS = true;
}
if (environment === 'test') {
// Testem prefers this...
ENV.baseURL = '/';
ENV.locationType = 'none';
// keep test console output quieter
ENV.APP.LOG_ACTIVE_GENERATION = false;
ENV.APP.LOG_VIEW_LOOKUPS = false;
ENV.APP.rootElement = '#ember-testing';
ENV['simple-auth-oauth2'] = {
serverTokenEndpoint: 'http://ift.tt/1BvEUvD'
};
ENV['simple-auth'] = {
authorizer: 'simple-auth-authorizer:oauth2-bearer',
crossOriginWhitelist: ['http://ift.tt/iMnaLP'],
store: 'simple-auth-session-store:local-storage'
};
}
if (environment === 'production') {
}
return ENV;
};
Aucun commentaire:
Enregistrer un commentaire