FarmMapsLib/projects/common/src/fm/common-routing.module.ts
Willem Dantuma baf8767a91
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
Refactor authentication flow
2020-05-09 09:14:16 +02:00

34 lines
1005 B
TypeScript

import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {AuthCallbackComponent} from './components/auth-callback/auth-callback.component';
import {AuthCallbackGuard} from './components/auth-callback/auth-callback.guard';
import {NavBarGuard} from './services/nav-bar-guard.service';
import {FullScreenGuard} from './services/full-screen-guard.service';
import {SessionClearedComponent} from './components/session-cleared/session-cleared.component';
import {NotFoundComponent} from './components/not-found/not-found.component';
const routes = [
{
path: 'cb',
component: AuthCallbackComponent
},
{
path: 'loggedout',
component: SessionClearedComponent,
canActivate: [FullScreenGuard],
},
{
path: '**', component: NotFoundComponent,
canActivate: [NavBarGuard]
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class AppCommonRoutingModule {
}