Socket
Book a DemoInstallSign in
Socket

ember-auth-engine

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-auth-engine

A simple auth addon for your Ember app.

0.1.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

ember-auth-engine

A simple auth addon for your Ember app.

Installation

  • npm install --save ember-auth-engine

Usage

You need to do two things to be able to use ember-auth-engine in your app. First, you need to set a few configuration options in your application's config/environment.js file:

ENV['ember-auth-engine'] = {
  host: 'https://api.example.com',
  authenticatedRoot: 'items'
};

At a bare minimum, you will need to set host and authenticatedRoot. However, most applications will likely need to specify a few other things. See here for all available configuration options.

The second required step is to mount the engine in your application's app/router.js file::

import Em from 'ember';
import config from './config/environment';
import { mount as mountAuth } from 'ember-auth-engine';

var Router = Em.Router.extend({
  location: config.locationType
});

Router.map(function() {
  mountAuth(this, function() {
    this.resource('someresourcerequiringauth');
    this.resource('anotherresourcerequiringauth');
  });
});

export default Router;

Once these two steps are done, your app will be rewarded with the following:

  • all the auth routes your app needs (login, forgotten password, etc)
  • a currentUser object available on all routes, controllers, and components
  • much, much more

Keywords

ember-addon

FAQs

Package last updated on 10 Dec 2014

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.