feat: Implement Login and Logout functionality, protect authenticated routes #12

Merged
ptran merged 8 commits from feature/oauth into main 2025-02-12 10:00:54 +00:00
Showing only changes of commit fa30fc3305 - Show all commits

View File

@ -1,13 +1,17 @@
import { Routes } from '@angular/router'; import {Routes} from '@angular/router';
import {LandingPageComponent} from "./landing-page/landing-page.component"; import {LandingPageComponent} from "./landing-page/landing-page.component";
import {HomepageComponent} from "./homepage/homepage/homepage.component"; import {HomepageComponent} from "./homepage/homepage/homepage.component";
import {authGuard} from "./auth.guard";
export const routes: Routes = [ export const routes: Routes = [
{ {
path: 'home', path: '',
component: HomepageComponent component: LandingPageComponent,
},
{
path: 'home',
component: HomepageComponent,
canActivate: [authGuard],
}, },
{ path: '', component: LandingPageComponent }
]; ];