2.0.1 • Published 3 years ago

ngx-smauth v2.0.1

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

NgxSmauth

SmAuth is an angular 12 sm authentication plugin.

Installation

Use the node package manager npm to install minmax.

npm i ngx-smauth

Usage

In your app module : 
import { NgxSmauthModule, NgxSmauthDirective } from 'ngx-smauth';
....

  imports: [
....
    NgxSmauthModule
.....
  ],
  providers: [
    NgxSmauthDirective
  ],

....
in your environment file declare the following :
  auth_login: 'login_url', (Login URL)
  auth_callback_url : 'http://localhost:4200', (return url)
  auth_logout: 'logout_url', (logout url)
  auth_me: 'me_api_url', (token validate url)
  local_key_name: 'token_key_name', (local key name)
  app_key: 'BF1E43QRN7_PA6T9M6C1QO', (app key)
  home_url: '/', (entry point)
  restore_load_url: true, (if should let user be on the initial url loaded)
In your app root component import NgxSmauthDirective and environment: 
import { NgxSmauthDirective } from 'ngx-smauth';
import {environment} from '../environments/environment'

initalise NgxSmauthDirective in your constructor as following :

  constructor( private smauth: NgxSmauthDirective) {
    this.smauth.auth_init(environment);
  }
1.1.9

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

0.0.0-watch

3 years ago

1.0.0

3 years ago