Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { AppComponent } from './app.component';
import { AppRouting } from './app-routing.module';
@NgModule({
imports: [
CommonModule,
HttpClientModule,
NbLayoutModule,
NbCardModule,
NbButtonModule,
AppRouting,
NbAuthModule.forRoot({
strategies: [
NbDummyAuthStrategy.setup({
name: 'email',
alwaysFail: true,
delay: 1000,
}),
],
}),
],
declarations: [
AppComponent,
],
})
export class AppModule {
}
beforeEach(() => {
TestBed.configureTestingModule({
imports: [HttpClientModule, HttpClientTestingModule, RouterTestingModule],
providers: [
{ provide: NB_AUTH_FALLBACK_TOKEN, useValue: NbAuthSimpleToken },
{ provide: NB_AUTH_TOKENS, useValue: [NbAuthJWTToken] },
NbAuthTokenParceler,
{
provide: NB_AUTH_USER_OPTIONS, useValue: {
strategies: [
NbDummyAuthStrategy.setup({
alwaysFail: false,
name: 'dummy',
}),
],
},
},
{ provide: NB_AUTH_OPTIONS, useFactory: nbOptionsFactory, deps: [NB_AUTH_USER_OPTIONS] },
{ provide: NB_AUTH_STRATEGIES, useFactory: nbStrategiesFactory, deps: [NB_AUTH_OPTIONS, Injector] },
{ provide: NbTokenStorage, useClass: NbTokenLocalStorage },
{ provide: HTTP_INTERCEPTORS, useClass: NbAuthJWTInterceptor, multi: true },
{ provide: NB_AUTH_TOKEN_INTERCEPTOR_FILTER, useValue: filterInterceptorRequest },
NbTokenService,
NbAuthService,
NbDummyAuthStrategy,
],
});
import { AppComponent } from './app.component';
import { AppRouting } from './app-routing.module';
@NgModule({
imports: [
CommonModule,
HttpClientModule,
NbLayoutModule,
NbCardModule,
NbButtonModule,
AppRouting,
NbAuthModule.forRoot({
strategies: [
NbDummyAuthStrategy.setup({
name: 'email',
alwaysFail: true,
delay: 1000,
}),
],
}),
],
declarations: [
AppComponent,
],
})
export class AppModule {
}
},
{
url: 'https://www.facebook.com/akveo',
target: '_blank',
icon: 'home-outline',
},
{
url: 'https://www.facebook.com/akveo',
target: '_blank',
title: 'Twitter',
},
],
},
},
strategies: [
NbDummyAuthStrategy.setup({
name: 'dummy',
alwaysFail: true,
delay: 1000,
}),
NbPasswordAuthStrategy.setup({
name: 'email',
token: {
class: NbAuthJWTToken,
},
login: {
requireValidToken: false,
},
baseEndpoint: 'http://localhost:4400/api/auth/',
logout: {
},
{
url: 'https://www.facebook.com/akveo',
target: '_blank',
icon: 'nb-home',
},
{
url: 'https://www.facebook.com/akveo',
target: '_blank',
title: 'Twitter',
},
],
},
},
strategies: [
NbDummyAuthStrategy.setup({
name: 'dummy',
alwaysFail: true,
delay: 1000,
}),
NbPasswordAuthStrategy.setup({
name: 'email',
token: {
class: NbAuthJWTToken,
},
login: {
requireValidToken: false,
},
baseEndpoint: 'http://localhost:4400/api/auth/',
logout: {