Registry / auth-security / ember-simple-auth-auth0

ember-simple-auth-auth0

JSON →
library5.0.0-beta.0jsnpmunverified

Ember addon integrating Auth0 authentication (Lock.js and Universal Login) with Ember Simple Auth. Version 5.0.0-beta.0 provides ESM-only support for Ember 3.x+. Key differentiators include dead-simple setup with automatic dependency management, support for embedded Lock widget and Universal Login, passwordless authentication, impersonation, silent auth, and a migration guide from v4.x to v5.x. Auth0 community-maintained.

npm install ember-simple-auth-auth0
INSTALL
IMPORT
SIG · EMBER-SIMPLE-AUTH-
E
ember-simple-auth-auth0
auth-securityjavascriptv5.0.0-beta.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
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
musl
node 18226 runs
build_error
glibc
node 18226 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}}
Debug
Known issues
breakingDeprecated import from 'ember-simple-auth-auth0' (default export) removed in v5. Must use specific module paths.
fix
Import authenticators from 'ember-simple-auth-auth0/authenticators/lock' or 'ember-simple-auth-auth0/authenticators/auth0' instead.
affects: >=5.0.0
breakingJWT authorizer and DataAdapterMixin removed in v5. Replace with Ember Simple Auth's built-in authorizer.
fix
Use 'ember-simple-auth/authorizers/data-adapter' or implement custom authorizer.
affects: >=5.0.0
gotchaLock widget must be included manually in app if not using auto-import. Addon does not inject Lock script automatically.
fix
Install and import 'auth0-lock' in your ember-cli-build.js or use a content delivery network.
affects: >=5.0.0
deprecatedPasswordless authentication API changed in v4. Old 'magicLink' option replaced with 'passwordless' method.
fix
Use 'Auth0PasswordlessAuthenticator' and configure via config.
affects: >=4.0.0 <5.0.0
gotchaEnvironment variable configuration uses 'ember-simple-auth-auth0' key. Typo in key will silently fail.
fix
Ensure exactly 'ember-simple-auth-auth0' (double hyphen) in ENV.
affects: all
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.
fix
Change 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.
fix
Add `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.
fix
Check `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
Agent activity
16 hits · last 30 days
node
14
Amazon
1
OpenAI (training)
1
Resources