mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-20 01:10:13 +01:00
Firebase authentication completed
This commit is contained in:
parent
b1e895f69a
commit
c26e0c99f1
11 changed files with 277 additions and 19 deletions
|
|
@ -4,7 +4,7 @@ import { FormsModule } from '@angular/forms';
|
|||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import { NgxAuthRoutingModule } from './auth-routing.module';
|
||||
import { NbAuthModule } from '@nebular/auth';
|
||||
import { NbAuthModule, NbPasswordAuthStrategy } from '@nebular/auth';
|
||||
import {
|
||||
NbAlertModule,
|
||||
NbButtonModule,
|
||||
|
|
@ -13,6 +13,7 @@ import {
|
|||
} from '@nebular/theme';
|
||||
import { NgxLoginComponent } from './login/login.component';
|
||||
import { NgxRegisterComponent } from './register/register.component';
|
||||
import { NbFirebasePasswordStrategyOptions } from './auth-firebase.config';
|
||||
|
||||
|
||||
@NgModule({
|
||||
|
|
@ -26,7 +27,29 @@ import { NgxRegisterComponent } from './register/register.component';
|
|||
NbCheckboxModule,
|
||||
NgxAuthRoutingModule,
|
||||
|
||||
NbAuthModule,
|
||||
NbAuthModule.forRoot({
|
||||
strategies: [
|
||||
NbPasswordAuthStrategy.setup({
|
||||
name: 'email',
|
||||
|
||||
login: {
|
||||
redirect: {
|
||||
success: '/dashboard',
|
||||
failure: null, // stay on the same page
|
||||
},
|
||||
},
|
||||
|
||||
register: {
|
||||
redirect: {
|
||||
success: '/auth/login',
|
||||
failure: null, // stay on the same page
|
||||
},
|
||||
},
|
||||
...new NbFirebasePasswordStrategyOptions()
|
||||
}),
|
||||
],
|
||||
forms: {},
|
||||
}),
|
||||
],
|
||||
declarations: [
|
||||
// ... here goes our new components
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue