Resubida app de ejemplo, la anterior no logueaba.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { OAuthModule } from 'angular-oauth2-oidc';
|
||||
import { OAuthModule, OAuthStorage } from 'angular-oauth2-oidc';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
@@ -9,14 +9,17 @@ import { APP_ROUTES } from './app.routes';
|
||||
import { BASE_URL } from './app.tokens';
|
||||
import { FlightHistoryComponent } from './flight-history/flight-history.component';
|
||||
import { HomeComponent } from './home/home.component';
|
||||
import { PasswordFlowLoginComponent } from './password-flow-login/password-flow-login.component';
|
||||
import { SharedModule } from './shared/shared.module';
|
||||
import { RouterModule, ExtraOptions } from '@angular/router';
|
||||
import { CustomPreloadingStrategy } from './shared/preload/custom-preloading.strategy';
|
||||
import { LocationStrategy, HashLocationStrategy } from '@angular/common';
|
||||
import { useHash } from '../flags';
|
||||
|
||||
const ROUTING_OPTIONS: ExtraOptions = {
|
||||
// preloadingStrategy: CustomPreloadingStrategy,
|
||||
useHash,
|
||||
initialNavigation: 'enabled'
|
||||
useHash: useHash,
|
||||
initialNavigation: !useHash
|
||||
};
|
||||
|
||||
@NgModule({
|
||||
@@ -29,7 +32,7 @@ const ROUTING_OPTIONS: ExtraOptions = {
|
||||
SharedModule.forRoot(),
|
||||
OAuthModule.forRoot({
|
||||
resourceServer: {
|
||||
allowedUrls: ['http://localhost:8080/api'],
|
||||
allowedUrls: ['http://www.angular.at/api'],
|
||||
sendAccessToken: true
|
||||
}
|
||||
})
|
||||
@@ -37,14 +40,15 @@ const ROUTING_OPTIONS: ExtraOptions = {
|
||||
declarations: [
|
||||
AppComponent,
|
||||
HomeComponent,
|
||||
FlightHistoryComponent
|
||||
FlightHistoryComponent,
|
||||
PasswordFlowLoginComponent
|
||||
],
|
||||
providers: [
|
||||
// (useHash) ? { provide: LocationStrategy, useClass: HashLocationStrategy } : [],
|
||||
// {provide: AuthConfig, useValue: authConfig },
|
||||
// { provide: OAuthStorage, useValue: localStorage },
|
||||
// { provide: ValidationHandler, useClass: JwksValidationHandler },
|
||||
{ provide: BASE_URL, useValue: 'http://localhost:8080' }
|
||||
{ provide: BASE_URL, useValue: 'http://www.angular.at' }
|
||||
],
|
||||
bootstrap: [AppComponent]
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user