Skip to content

zaubererty/ember-cli-django-rest-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[Ember Observer Score]

Ember CLI - Django Rest-Auth

About

A ember component to authenticate against Django Rest-Framework

Install

npm install ember-cli-django-rest-auth --save-dev

Usage

place your auth settings in your environment.js

if (environment === 'development') {
    ENV.APP.API_HOST = 'http://localhost:8000';
    ENV['simple-auth'] = {
      authorizer: 'authorizer:django-rest',
      serverTokenEndpoint: 'http://localhost:8000/api-token-auth/',
      crossOriginWhitelist: ['http://localhost:8000']
    };

Add following initializer to your app you may call it auth.js:

export default {
  name:       'auth',
  before:      'django-rest-auth',
  initialize: function(container, application){
  	window.ENV = <APPNAME>ENV;
  }
};

Authors

About

Auth-Provider for Django-Rest-Framework with Ember-Simple-Auth

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •