diff --git a/frontend/src/app/views/pages/login/login.component.scss b/frontend/src/app/views/pages/login/login.component.scss
index b49cf05..b623ebe 100644
--- a/frontend/src/app/views/pages/login/login.component.scss
+++ b/frontend/src/app/views/pages/login/login.component.scss
@@ -10,4 +10,24 @@
max-width: 100%;
max-height: 100%;
object-fit: contain;
-}
\ No newline at end of file
+}
+.button-container {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100%; /* Adjust height as needed */
+}
+
+.primary-button {
+ background-color: #007bff; /* Primary color */
+ color: white;
+ border: none;
+ padding: 10px 20px;
+ font-size: 16px;
+ cursor: pointer;
+ border-radius: 4px;
+}
+
+.primary-button:hover {
+ background-color: #0056b3;
+}
diff --git a/frontend/src/app/views/pages/login/login.component.ts b/frontend/src/app/views/pages/login/login.component.ts
index 2fd4957..ae8ee54 100644
--- a/frontend/src/app/views/pages/login/login.component.ts
+++ b/frontend/src/app/views/pages/login/login.component.ts
@@ -42,6 +42,8 @@ import {getNavItems, navItems} from "../../../layout/default-layout/_nav";
})
export class LoginComponent implements OnInit{
loginForm: FormGroup;
+ password: boolean = true;
+ sso: boolean = false;
constructor(private fb: FormBuilder, private authService: AuthService, private router: Router) {
this.loginForm = this.fb.group({
@@ -97,6 +99,7 @@ export class LoginComponent implements OnInit{
}
}
ngOnInit() {
+ this.getStatus();
this.authService.hc().subscribe({
next: () => {
this.router.navigate(['/dashboard']);
@@ -106,5 +109,21 @@ export class LoginComponent implements OnInit{
}
});
}
+ getStatus() {
+ this.authService.status().subscribe({
+ next: (response) => {
+ if (response.status === 'prodsso' || response.status === 'devsso'){
+ this.password = false;
+ this.sso = true;
+ }
+ },
+ error: () => {
+ // Health check failed, stay on login page
+ }
+ });
+ }
+ redirectToSSO(): void {
+ window.location.href = 'http://localhost:8888/oauth2/authorization/sso';
+ }
}