Registry /
auth-security / ember-simple-auth-auth0
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.
Auth0LockAuthenticator
✓ import Auth0LockAuthenticator from 'ember-simple-auth-auth0/authenticators/lock'
✗ import Auth0LockAuthenticator from 'ember-simple-auth-auth0'
Only available since v5. Must import from the specific path. Default export not available from package root.
Auth0PasswordlessAuthenticator
✓ import Auth0PasswordlessAuthenticator from 'ember-simple-auth-auth0/authenticators/passwordless'
Separate authenticator for passwordless auth. Not included in default export.
Auth0Authenticator
✓ import Auth0Authenticator from 'ember-simple-auth-auth0/authenticators/auth0'
Base authenticator for universal login. Used when not using Lock widget.
Shows basic configuration and login/logout flow with Lock authenticator.
// config/environment.js
ENV['ember-simple-auth-auth0'] = {
clientID: process.env.AUTH0_CLIENT_ID ?? 'your-client-id',
domain: process.env.AUTH0_DOMAIN ?? 'your-domain.auth0.com',
logoutReturnToURL: 'http://localhost:4200'
};
// app/routes/application.js
import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
export default class ApplicationRoute extends Route {
@service session;
beforeModel() {
return this.session.setup();
}
@action
login() {
this.session.authenticate('authenticator:lock');
}
@action
logout() {
this.session.invalidate();
}
}
// app/controllers/application.js (partial)
import Controller from '@ember/controller';
import { inject as service } from '@ember/service';
export default class ApplicationController extends Controller {
@service session;
}
// Handlebars template
{{#if this.session.isAuthenticated}}
<p>Welcome, {{this.session.data.authenticated.profile.name}}!</p>
<button {{on 'click' this.logout}}>Logout</button>
{{else}}
<button {{on 'click' this.login}}>Login</button>
{{/if}}
Errors
Common errors & fixes
Could not find module `ember-simple-auth-auth0` imported from `my-app/app/authenticators/lock`
Mistakenly trying to import default export from package root.
fixChange import to `import Auth0LockAuthenticator from 'ember-simple-auth-auth0/authenticators/lock'`
Uncaught TypeError: Cannot read properties of undefined (reading 'setup')
Missing `beforeModel` call to `this.session.setup()` in application route.
fixAdd `this.session.setup()` in the `beforeModel` hook of your application route.
auth0-js: Invalid clientID or domain
Client ID or domain missing or incorrect in config.
fixCheck `config/environment.js` that `ENV['ember-simple-auth-auth0'].clientID` and `ENV['ember-simple-auth-auth0'].domain` are set correctly.
Upgrade
Version history
5.0.0-beta.0latest on npm
Audit
Dependencies
ember-simple-authrequiredCore authentication framework for Ember apps
auth0-jsrequiredAuth0's JavaScript client library for authentication
auth0-lockoptionalAuth0's Lock widget for embedded login UI