td-aio-auth
v1.2.1
Published
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.2.0. It contains the `all in one` authentication like with normal email/password, Gmail, Facebook & Instagram. It also have inbuilt User registration.
Downloads
132
Maintainers
Readme
tdAuthV01
This library was generated with Angular CLI version 7.2.0.
It contains the all in one
authentication like with normal email/password, Gmail, Facebook & Instagram. It also have inbuilt User registration.
Installation
Run npm i td-aio-auth
to install this package.
Configuration
After installation, you must have to do some configuration in App Module file. This configuration includes :
- Login, Registration Title & Heading
- Gmail Provider id( Client Id)
- Gmail Api Key
- Facebook client Id
- Instagram API Key
- URL after login
- Web API URL where you want to send your login/registration data
Examples:
`const authConfigs: AuthConfig = { gmailProvider: '', gmailAPIKey: '', FBProvider:'*****', AfterLoginURL : 'dashboard', loginURL: 'login', registerURL: 'register', forgetPwdURL: 'forget-password', ApiURL: 'http://localhost:4000', IGClientid: '*************', IGRedirectURL: 'http://localhost:4200/login' //default we have redirect to login page, regSuccessMsg: "Success message on registration", resetPwdURL: "Reset password url"
};`
Usage
include the module & configuration in app.module.ts . import { AioAuthV01Module, AuthConfig } from 'td-aio-auth';
@NgModule({ declarations: [ AppComponent, ], imports: [
AioAuthV01Module,
AioAuthV01Module.forRoot(authConfigs)
], providers: [AioAuthV01Service] })
Login/Register Form Setup
For normal login:
<td-fblogin><</td-fblogin>
For Gmail Login/Registration:
<td-gmaillogin><</td-gmaillogin>
For Facebook Login/Registration:
<td-fblogin><</td-fblogin>
For Instagram Login/Registration:
<td-insta-login></td-insta-login>
For Registration:
<td-register></td-register>
For LogOut component:
<td-log-out></td-log-out>