Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
default
✓ import SimpleAuth from 'ember-cli-simple-auth'
✗ const SimpleAuth = require('ember-cli-simple-auth')
ES module import; the addon automatically initializes, manual import often not needed.
Authenticator
✓ import Authenticator from 'ember-cli-simple-auth/authenticators/base'
✗ import { Authenticator } from 'ember-cli-simple-auth'
Named import from subpath is incorrect; must import base class from specific path.
Authorizer
✓ import Authorizer from 'ember-cli-simple-auth/authorizers/base'
✗ import { Authorizer } from 'ember-cli-simple-auth'
Same as Authenticator; import from subpath.
Session
✓ import Session from 'ember-cli-simple-auth/sessions/base'
✗ import { Session } from 'ember-cli-simple-auth'
Session base class must be imported from the sessions subpath.
SessionStore
✓ import SessionStore from 'ember-cli-simple-auth/stores/base'
✗ import { SessionStore } from 'ember-cli-simple-auth'
Store base class must be imported from the stores subpath.
Basic installation, configuration, and usage of authentication and session management.
// Install the addon
ember install ember-cli-simple-auth
// Configure in config/environment.js
module.exports = function(environment) {
var ENV = {
// ... other config
'simple-auth': {
routeAfterAuthentication: '/protected',
serverTokenEndpoint: '/api/token',
serverTokenRevocationEndpoint: '/api/revoke'
}
};
return ENV;
};
// Use the session in a route or controller
import Session from 'ember-cli-simple-auth/sessions/base';
export default Ember.Controller.extend({
session: Ember.inject.service(),
actions: {
login: function() {
this.get('session').authenticate('simple-auth-authenticator:oauth2-password-grant', {
identification: this.get('username'),
password: this.get('password')
});
},
logout: function() {
this.get('session').invalidate();
}
}
});
Errors
Common errors & fixes
Cannot find module 'ember-cli-simple-auth'
Package not installed or not added to package.json.
fixRun `ember install ember-cli-simple-auth` to install and add to dependencies.
Uncaught TypeError: Cannot read property 'authenticate' of undefined
Session service not injected or session property is undefined.
fixEnsure you have the session service injected: session: Ember.inject.service().
Assertion Failed: Unable to find authenticator: simple-auth-authenticator:oauth2-password-grant
Missing or misspelled authenticator name; the authenticator must be registered.
fixCheck that the authenticator is correctly registered, e.g., `export default Ember.SimpleAuth.Authenticators.OAuth2PasswordGrant.extend(...)` or installed via addon.
The `ember-cli-simple-auth` addon requires an Ember CLI version of 0.0.44 or above
Ember CLI version is too old.
fixUpgrade Ember CLI to at least 0.0.44.
Audit
Dependencies
No dependency data recorded yet.