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
2 changed files with 7 additions and 1 deletions
Showing only changes of commit 53f21a220f - Show all commits

View File

@ -0,0 +1 @@
<button (click)="login()">Login</button>

View File

@ -1,4 +1,5 @@
import { Component } from '@angular/core'; import {Component, inject} from '@angular/core';
import {KeycloakService} from "keycloak-angular";
@Component({ @Component({
selector: 'app-landing-page', selector: 'app-landing-page',
@ -7,5 +8,9 @@ import { Component } from '@angular/core';
templateUrl: './landing-page.component.html', templateUrl: './landing-page.component.html',
}) })
export class LandingPageComponent { export class LandingPageComponent {
private keycloakService: KeycloakService = inject(KeycloakService);
login() {
this.keycloakService.login();
}
} }