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 dc993b2879 - Show all commits

View File

@ -11,6 +11,10 @@ export class LandingPageComponent {
private keycloakService: KeycloakService = inject(KeycloakService); private keycloakService: KeycloakService = inject(KeycloakService);
login() { login() {
this.keycloakService.login(); this.keycloakService.login()
.catch(error => {
alert("Error: Unable to redirect to login page. Please try again later.");
console.error('Error redirecting to login:', error);
});
} }
} }