change to firebase auth

This commit is contained in:
2025-02-18 18:05:51 -06:00
parent b9a9b983e9
commit a2e6243e93
34 changed files with 465 additions and 63 deletions

View File

@@ -4,6 +4,7 @@ import { Router, RouterModule } from '@angular/router';
import { KeycloakService } from 'keycloak-angular';
import { User } from '../../../../../bizmatch-server/src/models/db.model';
import { AuditService } from '../../services/audit.service';
import { AuthService } from '../../services/auth.service';
import { UserService } from '../../services/user.service';
import { map2User } from '../../utils/utils';
@@ -18,12 +19,13 @@ export class SuccessComponent {
user: User;
maxAttemptsReached: boolean = false; // Neue Variable hinzufügen
constructor(private keycloakService: KeycloakService, private userService: UserService, private auditService: AuditService, private router: Router) {}
constructor(private keycloakService: KeycloakService, private userService: UserService, private auditService: AuditService, private router: Router, private authService: AuthService) {}
async ngOnInit() {
let email = null;
try {
const token = await this.keycloakService.getToken();
// const token = await this.keycloakService.getToken();
const token = await this.authService.getToken();
const keycloakUser = map2User(token);
email = keycloakUser.email;
this.user = await this.userService.getByMail(email);