
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
ember-icis-auth
Advanced tools
This Ember CLI addon gives you everything you need to start authenticating against our identity service which will allow you access to our service layer via CORS.
What this does for you:
npm install --save-dev ember-icis-auth
ember g ember-icis-auth
Then modify your Brocfile.js to add this:
//Brocfile.js
app.import('bower_components/oauth-js/dist/oauth.js');
Create an OAuth initializer:
//app/initializers/oauth.js
import config from 'notes-dash/config/environment';
export default {
name: 'notes-dash',
initialize: function() {
OAuth.initialize(config.APP.OAUTHD_KEY);
OAuth.setOAuthdURL(config.APP.OAUTHD_URL);
}
};
Create authenticator service, and optionally a test double service:
//app/services/authenticator.js
import authenticator from 'ember-icis-auth/services/authenticator';
import config from 'notes-dash/config/environment';
export default authenticator.extend({
snowflake_provider: config.APP.SNOWFLAKE_PROVIDER
});
//app/services/test-authenticator.js
import authenticator from 'ember-icis-auth/services/test-authenticator';
import config from 'notes-dash/config/environment';
export default authenticator.extend({
snowflake_provider: config.APP.SNOWFLAKE_PROVIDER
});
Create an Authenticator initializer:
//app/initializer/authenticator.js
import config from 'notes-dash/config/environment';
export function initialize(container, application) {
var service;
if (config.environment === 'test') {
// use provided test double in test environment
service = 'service:test-authenticator';
} else {
service = 'service:authenticator';
}
// injects dependency into all routes
application.inject('route', 'authenticator', service);
// Alternatively you can inject the authenticator into only routes which need
// to access it, (for example the auth route, routes with include the
// AuthenticatedRouteMixin, routes with custom auth logic):
// application.inject('route:some-authenticated-route', 'authenticator', service);
}
export default {
name: 'authenticator',
initialize: initialize
};
Set the specific route configs:
//app/routes/index.js
import config from 'notes-dash/config/environment';
import Index from 'ember-icis-auth/routes/index';
export default Index.reopen({
snowflake_provider: config.APP.SNOWFLAKE_PROVIDER,
snowflake_url: config.APP.SNOWFLAKE_URI
});
//app/routes/auth.js
import Auth from 'ember-icis-auth/routes/auth'
import config from 'notes-dash/config/environment'
export default Auth.reopen({
snowflake_provider: config.APP.SNOWFLAKE_PROVIDER
});
Set up the store adapter for the current-user model:
//app/adapters/current-user.js
import CurrentUser from 'ember-icis-auth/adapters/current-user';
import config from 'notes-dash/config/environment';
export default CurrentUser.reopen({
host: config.APP.SNOWFLAKE_URI
});
And finally setup the basic routing:
//app/router.js
Router.map(function() {
this.route("auth");
this.route("token");
});
The default behavior in the auth route transitions to the app's index after successful authentication. You may wish to implement other logic, and the auth route makes it easy to do so using the transitionToTargetRoute callback.
//app/routes/auth.js
import Auth from 'ember-icis-auth/routes/auth'
import config from 'notes-dash/config/environment'
export default Auth.reopen({
snowflake_provider: config.APP.SNOWFLAKE_PROVIDER,
transitionToTargetRoute: function(transition) {
console.log("We're authenticated now!");
this._super(transition);
}
});
ember test
ember test --server
It's often easier to provide a local link to this library while developing a widget. This is how you go about it.
In the CLI app you are building first lower the requirement for the widget lib:
//package.json
"devDependencies": {
//"ember-icis-auth": "~ 0.1.0"
"ember-icis-auth": "*"
}
Next, in this directory link the local version into npm:
npm link
Then in the CLI directory, link the local version of this lib:
npm link ember-icis-auth
FAQs
Authentication engine for ICIS applications
The npm package ember-icis-auth receives a total of 0 weekly downloads. As such, ember-icis-auth popularity was classified as not popular.
We found that ember-icis-auth demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.