tdn-auth
TypeScript icon, indicating that this package has built-in type declarations

5.0.9 • Public • Published

TDN Auth

This project provides an interface with Django-rest-auth

Installation

npm install tdn-auth

How to use it?

To use it, you must add in your app.module:

import { AuthModule } from 'angular-auth/auth.module';

and in the imports section:

AuthModule.forRoot()

If you need to override some parameters from the AuthModule, you can create your custom config by extending AuthConfig:

import { Injectable } from '@angular/core';
import { AuthConfig } from 'tdn-auth/auth.config';
import { environment } from '../environments/environment';

@Injectable()
export class CustomAuthConfig extends AuthConfig {
    constructor() {
        super();
        this.base_url = environment.api_base_url;
    }

}

and then inject it in the import section like this:

AuthModule.forRoot(CustomAuthConfig),

How to create a new delivery?

Using this excellent tutorial, you simply need to run:

npm install
npm run build

If you want to test it locally, go in the dist folder and run npm link. Then go to your test app root dir and do npm link tdn-auth Re-start your server with following command: ng serve --preserve-symlinks

Publish to NPM

Go to the dist folder and run:

npm login
npm publish

Package Sidebar

Install

npm i tdn-auth

Weekly Downloads

16

Version

5.0.9

License

MIT

Last publish

Collaborators

  • thibserot