Created auth module. Created Visitor auth guard for non-logged in users.
This commit is contained in:
@@ -1,33 +1,43 @@
|
||||
import { Routes } from '@angular/router';
|
||||
import { PolicyComponent } from './policies/policy/policy.component';
|
||||
import { AuthUserGuard } from './shared/auth/auth.user.guard';
|
||||
import { LoginComponent } from './login/login.component';
|
||||
import { TtsLoginComponent } from './tts-login/tts-login.component';
|
||||
import { LoginComponent } from './auth/login/login.component';
|
||||
import { TtsLoginComponent } from './auth/tts-login/tts-login.component';
|
||||
import { TwitchAuthCallbackComponent } from './twitch-auth-callback/twitch-auth-callback.component';
|
||||
import { FiltersComponent } from './tts-filters/filters/filters.component';
|
||||
import { AuthAdminGuard } from './shared/auth/auth.admin.guard';
|
||||
import { ActionComponent } from './actions/action/action.component';
|
||||
import { AuthVisitorGuard } from './shared/auth/auth.visitor.guard';
|
||||
|
||||
export const routes: Routes = [
|
||||
{
|
||||
path: 'policies',
|
||||
component: PolicyComponent,
|
||||
canActivate: [AuthUserGuard],
|
||||
},
|
||||
{
|
||||
path: 'filters',
|
||||
component: FiltersComponent,
|
||||
canActivate: [AuthUserGuard],
|
||||
},
|
||||
{
|
||||
path: 'login',
|
||||
component: LoginComponent,
|
||||
},
|
||||
{
|
||||
path: 'tts-login',
|
||||
component: TtsLoginComponent,
|
||||
canActivate: [AuthUserGuard],
|
||||
},
|
||||
{
|
||||
path: 'auth',
|
||||
component: TwitchAuthCallbackComponent
|
||||
}
|
||||
{
|
||||
path: 'policies',
|
||||
component: PolicyComponent,
|
||||
canActivate: [AuthUserGuard],
|
||||
},
|
||||
{
|
||||
path: 'filters',
|
||||
component: FiltersComponent,
|
||||
canActivate: [AuthUserGuard],
|
||||
},
|
||||
{
|
||||
path: 'actions',
|
||||
component: ActionComponent,
|
||||
canActivate: [AuthAdminGuard],
|
||||
},
|
||||
{
|
||||
path: 'login',
|
||||
component: LoginComponent,
|
||||
canActivate: [AuthVisitorGuard],
|
||||
},
|
||||
{
|
||||
path: 'tts-login',
|
||||
component: TtsLoginComponent,
|
||||
canActivate: [AuthUserGuard],
|
||||
},
|
||||
{
|
||||
path: 'auth',
|
||||
component: TwitchAuthCallbackComponent,
|
||||
canActivate: [AuthVisitorGuard],
|
||||
}
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user