sync build tree from private myoffice
This commit is contained in:
@@ -9,12 +9,14 @@ import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
|||||||
import { LoadingBarRouterModule } from '@ngx-loading-bar/router';
|
import { LoadingBarRouterModule } from '@ngx-loading-bar/router';
|
||||||
import { LoadingBarHttpClientModule } from '@ngx-loading-bar/http-client';
|
import { LoadingBarHttpClientModule } from '@ngx-loading-bar/http-client';
|
||||||
import { NgScrollbarModule } from 'ngx-scrollbar';
|
import { NgScrollbarModule } from 'ngx-scrollbar';
|
||||||
|
import { SocialAuthService, SocialLoginModule } from '@abacritt/angularx-social-login';
|
||||||
|
|
||||||
// app
|
// app
|
||||||
import { CoreModule } from './core/core.module';
|
import { CoreModule } from './core/core.module';
|
||||||
import { AppRoutingModule } from './app-routing.module';
|
import { AppRoutingModule } from './app-routing.module';
|
||||||
import { ErrorInterceptor } from './core/interceptor/error.interceptor';
|
import { ErrorInterceptor } from './core/interceptor/error.interceptor';
|
||||||
import { UpdateDateHttpInterceptor } from './core/interceptor/update.date.http.interceptor ';
|
import { UpdateDateHttpInterceptor } from './core/interceptor/update.date.http.interceptor ';
|
||||||
|
import { ExternalLoginConfig } from './config.external-login';
|
||||||
|
|
||||||
export function createTranslateLoader(http: HttpClient) {
|
export function createTranslateLoader(http: HttpClient) {
|
||||||
return new TranslateHttpLoader(http, 'assets/i18n/', '.json');
|
return new TranslateHttpLoader(http, 'assets/i18n/', '.json');
|
||||||
@@ -35,11 +37,16 @@ export const appConfig: ApplicationConfig = {
|
|||||||
deps: [HttpClient],
|
deps: [HttpClient],
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
// core & shared
|
|
||||||
CoreModule,
|
CoreModule,
|
||||||
|
SocialLoginModule,
|
||||||
),
|
),
|
||||||
|
// AuthService is providedIn: 'root' — config must be on the app injector (string token for lib 2.1.x)
|
||||||
|
{
|
||||||
|
provide: 'SocialAuthServiceConfig',
|
||||||
|
useValue: ExternalLoginConfig.getSocialConfig(),
|
||||||
|
},
|
||||||
|
SocialAuthService,
|
||||||
{ provide: LocationStrategy, useClass: HashLocationStrategy },
|
{ provide: LocationStrategy, useClass: HashLocationStrategy },
|
||||||
// Bearer tokens: angular-oauth2-oidc resourceServer (AuthModuleConfig.sendAccessToken)
|
|
||||||
{ provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true },
|
{ provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true },
|
||||||
{ provide: HTTP_INTERCEPTORS, useClass: UpdateDateHttpInterceptor, multi: true },
|
{ provide: HTTP_INTERCEPTORS, useClass: UpdateDateHttpInterceptor, multi: true },
|
||||||
provideHttpClient(withInterceptorsFromDi()),
|
provideHttpClient(withInterceptorsFromDi()),
|
||||||
|
|||||||
@@ -7,10 +7,9 @@ import { APP_INITIALIZER } from '@angular/core';
|
|||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
|
|
||||||
// libs
|
// libs
|
||||||
|
import { AuthModule } from '@auth0/auth0-angular';
|
||||||
import { OAuthModule, OAuthModuleConfig, OAuthStorage } from 'angular-oauth2-oidc';
|
import { OAuthModule, OAuthModuleConfig, OAuthStorage } from 'angular-oauth2-oidc';
|
||||||
import { AuthConfig } from 'angular-oauth2-oidc';
|
import { AuthConfig } from 'angular-oauth2-oidc';
|
||||||
import { AuthModule } from '@auth0/auth0-angular';
|
|
||||||
import { SocialLoginModule } from '@abacritt/angularx-social-login';
|
|
||||||
|
|
||||||
// app
|
// app
|
||||||
import { AuthGuard } from './guard/auth.guard';
|
import { AuthGuard } from './guard/auth.guard';
|
||||||
@@ -33,7 +32,6 @@ export function storageFactory(): OAuthStorage {
|
|||||||
declarations: [],
|
declarations: [],
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
SocialLoginModule.initialize(ExternalLoginConfig.getSocialConfig()),
|
|
||||||
OAuthModule.forRoot(),
|
OAuthModule.forRoot(),
|
||||||
AuthModule.forRoot(ExternalLoginConfig.getAuth0Config()),
|
AuthModule.forRoot(ExternalLoginConfig.getAuth0Config()),
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user