diff --git a/bizmatch-server/.gitignore b/bizmatch-server/.gitignore
index 68cb476..377b11e 100644
--- a/bizmatch-server/.gitignore
+++ b/bizmatch-server/.gitignore
@@ -58,6 +58,7 @@ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
pictures
pictures_base
+pictures_
src/*.js
bun.lockb
diff --git a/bizmatch-server/.vscode/launch.json b/bizmatch-server/.vscode/launch.json
index 1a645a2..fb9a8e7 100644
--- a/bizmatch-server/.vscode/launch.json
+++ b/bizmatch-server/.vscode/launch.json
@@ -20,10 +20,10 @@
{
"type": "node",
"request": "launch",
- "name": "Launch TypeScript file with tsx",
+ "name": "Launch import from exported with tsx",
"runtimeExecutable": "npx",
"runtimeArgs": ["tsx", "--inspect"],
- "args": ["${workspaceFolder}/src/drizzle/import.ts"],
+ "args": ["${workspaceFolder}/src/drizzle/importFromExported.ts"],
"cwd": "${workspaceFolder}",
"outFiles": ["${workspaceFolder}/dist/**/*.js", "!**/node_modules/**"],
"sourceMaps": true,
diff --git a/bizmatch-server/src/app.module.ts b/bizmatch-server/src/app.module.ts
index b40aec7..928533f 100644
--- a/bizmatch-server/src/app.module.ts
+++ b/bizmatch-server/src/app.module.ts
@@ -23,7 +23,6 @@ import { APP_INTERCEPTOR } from '@nestjs/core';
import { ClsMiddleware, ClsModule } from 'nestjs-cls';
import { LoggingInterceptor } from './interceptors/logging.interceptor';
import { UserInterceptor } from './interceptors/user.interceptor';
-import { PaymentModule } from './payment/payment.module';
import { RequestDurationMiddleware } from './request-duration/request-duration.middleware';
import { SelectOptionsModule } from './select-options/select-options.module';
import { UserModule } from './user/user.module';
@@ -70,7 +69,7 @@ console.log(JSON.stringify(process.env, null, 2));
PassportModule,
AiModule,
LogModule,
- PaymentModule,
+ // PaymentModule,
EventModule,
],
controllers: [AppController, LogController],
diff --git a/bizmatch/package.json b/bizmatch/package.json
index 5cf23a8..4b88f19 100644
--- a/bizmatch/package.json
+++ b/bizmatch/package.json
@@ -18,6 +18,7 @@
"@angular/common": "^18.1.3",
"@angular/compiler": "^18.1.3",
"@angular/core": "^18.1.3",
+ "@angular/fire": "^18.0.1",
"@angular/forms": "^18.1.3",
"@angular/platform-browser": "^18.1.3",
"@angular/platform-browser-dynamic": "^18.1.3",
diff --git a/bizmatch/src/app/app.component.html b/bizmatch/src/app/app.component.html
index cefdb7c..0523329 100644
--- a/bizmatch/src/app/app.component.html
+++ b/bizmatch/src/app/app.component.html
@@ -1,6 +1,6 @@
- @if (actualRoute !=='home'){
+ @if (actualRoute !=='home' && actualRoute !=='login'){
}
diff --git a/bizmatch/src/app/app.config.ts b/bizmatch/src/app/app.config.ts
index 894734a..72eb61b 100644
--- a/bizmatch/src/app/app.config.ts
+++ b/bizmatch/src/app/app.config.ts
@@ -2,6 +2,8 @@ import { APP_INITIALIZER, ApplicationConfig, ErrorHandler } from '@angular/core'
import { provideRouter, withEnabledBlockingInitialNavigation, withInMemoryScrolling } from '@angular/router';
import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
+import { initializeApp, provideFirebaseApp } from '@angular/fire/app';
+import { getAuth, provideAuth } from '@angular/fire/auth';
import { provideAnimations } from '@angular/platform-browser/animations';
import { KeycloakBearerInterceptor, KeycloakService } from 'keycloak-angular';
import { GALLERY_CONFIG, GalleryConfig } from 'ng-gallery';
@@ -9,7 +11,9 @@ import { provideQuillConfig } from 'ngx-quill';
import { provideShareButtonsOptions, SharerMethods, withConfig } from 'ngx-sharebuttons';
import { shareIcons } from 'ngx-sharebuttons/icons';
import { provideNgxStripe } from 'ngx-stripe';
+import { environment } from '../environments/environment';
import { routes } from './app.routes';
+import { AuthInterceptor } from './interceptors/auth.interceptor';
import { LoadingInterceptor } from './interceptors/loading.interceptor';
import { TimeoutInterceptor } from './interceptors/timeout.interceptor';
import { GlobalErrorHandler } from './services/globalErrorHandler';
@@ -52,6 +56,7 @@ export const appConfig: ApplicationConfig = {
useClass: TimeoutInterceptor,
multi: true,
},
+ { provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true },
{
provide: 'TIMEOUT_DURATION',
useValue: 5000, // Standard-Timeout von 5 Sekunden
@@ -93,6 +98,9 @@ export const appConfig: ApplicationConfig = {
],
},
}),
+ provideFirebaseApp(() => initializeApp(environment.firebaseConfig)),
+ provideAuth(() => getAuth()),
+ // provideFirestore(() => getFirestore()),
],
};
function initServices(selectOptions: SelectOptionsService) {
diff --git a/bizmatch/src/app/app.routes.ts b/bizmatch/src/app/app.routes.ts
index dbf83a5..b4f912c 100644
--- a/bizmatch/src/app/app.routes.ts
+++ b/bizmatch/src/app/app.routes.ts
@@ -2,6 +2,7 @@ import { Routes } from '@angular/router';
import { LogoutComponent } from './components/logout/logout.component';
import { NotFoundComponent } from './components/not-found/not-found.component';
+import { LoginRegisterComponent } from './components/login-register/login-register.component';
import { AuthGuard } from './guards/auth.guard';
import { ListingCategoryGuard } from './guards/listing-category.guard';
import { UserListComponent } from './pages/admin/user-list/user-list.component';
@@ -12,7 +13,6 @@ import { HomeComponent } from './pages/home/home.component';
import { BrokerListingsComponent } from './pages/listings/broker-listings/broker-listings.component';
import { BusinessListingsComponent } from './pages/listings/business-listings/business-listings.component';
import { CommercialPropertyListingsComponent } from './pages/listings/commercial-property-listings/commercial-property-listings.component';
-import { LoginComponent } from './pages/login/login.component';
import { PricingComponent } from './pages/pricing/pricing.component';
import { AccountComponent } from './pages/subscription/account/account.component';
import { EditBusinessListingComponent } from './pages/subscription/edit-business-listing/edit-business-listing.component';
@@ -57,9 +57,17 @@ export const routes: Routes = [
canActivate: [ListingCategoryGuard],
component: NotFoundComponent, // Dummy-Komponente, wird nie angezeigt, da der Guard weiterleitet
},
+ // {
+ // path: 'login/:page',
+ // component: LoginComponent, // Dummy-Komponente, wird nie angezeigt, da der Guard weiterleitet
+ // },
{
path: 'login/:page',
- component: LoginComponent, // Dummy-Komponente, wird nie angezeigt, da der Guard weiterleitet
+ component: LoginRegisterComponent, // Dummy-Komponente, wird nie angezeigt, da der Guard weiterleitet
+ },
+ {
+ path: 'login',
+ component: LoginRegisterComponent, // Dummy-Komponente, wird nie angezeigt, da der Guard weiterleitet
},
{
path: 'notfound',
diff --git a/bizmatch/src/app/components/email-verification/email-verification.component.html b/bizmatch/src/app/components/email-verification/email-verification.component.html
new file mode 100644
index 0000000..9187aa7
--- /dev/null
+++ b/bizmatch/src/app/components/email-verification/email-verification.component.html
@@ -0,0 +1,7 @@
+
+
+
Email Verification
+
A verification email has been sent to your email address. Please check your inbox and click the link to verify your account.
+
Once verified, please return to the application.
+
+
diff --git a/bizmatch/src/app/components/email-verification/email-verification.component.ts b/bizmatch/src/app/components/email-verification/email-verification.component.ts
new file mode 100644
index 0000000..79f44b7
--- /dev/null
+++ b/bizmatch/src/app/components/email-verification/email-verification.component.ts
@@ -0,0 +1,9 @@
+import { Component } from '@angular/core';
+
+@Component({
+ selector: 'app-email-verification',
+ standalone: true,
+ imports: [],
+ templateUrl: './email-verification.component.html',
+})
+export class EmailVerificationComponent {}
diff --git a/bizmatch/src/app/components/footer/footer.component.html b/bizmatch/src/app/components/footer/footer.component.html
index 28ceb87..4d6f7fe 100644
--- a/bizmatch/src/app/components/footer/footer.component.html
+++ b/bizmatch/src/app/components/footer/footer.component.html
@@ -11,7 +11,7 @@
diff --git a/bizmatch/src/app/components/header/header.component.html b/bizmatch/src/app/components/header/header.component.html
index ee22834..7943e2b 100644
--- a/bizmatch/src/app/components/header/header.component.html
+++ b/bizmatch/src/app/components/header/header.component.html
@@ -135,10 +135,10 @@
diff --git a/bizmatch/src/app/components/header/header.component.ts b/bizmatch/src/app/components/header/header.component.ts
index ebbc65e..5609c38 100644
--- a/bizmatch/src/app/components/header/header.component.ts
+++ b/bizmatch/src/app/components/header/header.component.ts
@@ -11,6 +11,7 @@ import { filter, Observable, Subject, Subscription } from 'rxjs';
import { SortByOptions, User } from '../../../../../bizmatch-server/src/models/db.model';
import { BusinessListingCriteria, CommercialPropertyListingCriteria, emailToDirName, KeycloakUser, KeyValueAsSortBy, UserListingCriteria } from '../../../../../bizmatch-server/src/models/main.model';
import { environment } from '../../../environments/environment';
+import { AuthService } from '../../services/auth.service';
import { CriteriaChangeService } from '../../services/criteria-change.service';
import { SearchService } from '../../services/search.service';
import { SelectOptionsService } from '../../services/select-options.service';
@@ -56,6 +57,7 @@ export class HeaderComponent {
private searchService: SearchService,
private criteriaChangeService: CriteriaChangeService,
public selectOptions: SelectOptionsService,
+ private authService: AuthService,
) {}
@HostListener('document:click', ['$event'])
handleGlobalClick(event: Event) {
@@ -65,7 +67,8 @@ export class HeaderComponent {
}
}
async ngOnInit() {
- const token = await this.keycloakService.getToken();
+ //const token = await this.keycloakService.getToken();
+ const token = await this.authService.getToken();
this.keycloakUser = map2User(token);
if (this.keycloakUser) {
this.user = await this.userService.getByMail(this.keycloakUser?.email);
diff --git a/bizmatch/src/app/components/login-register/login-register.component.html b/bizmatch/src/app/components/login-register/login-register.component.html
new file mode 100644
index 0000000..c3f5c6a
--- /dev/null
+++ b/bizmatch/src/app/components/login-register/login-register.component.html
@@ -0,0 +1,51 @@
+
+
+
+ {{ isLoginMode ? 'Login' : 'Registrierung' }}
+
+
+
+
+
Login
+
+
Sign Up
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ errorMessage }}
+
+
+
+
+
+ or
+
+
+
+
+
+
diff --git a/bizmatch/src/app/components/login-register/login-register.component.ts b/bizmatch/src/app/components/login-register/login-register.component.ts
new file mode 100644
index 0000000..35664e4
--- /dev/null
+++ b/bizmatch/src/app/components/login-register/login-register.component.ts
@@ -0,0 +1,85 @@
+import { CommonModule } from '@angular/common';
+import { Component } from '@angular/core';
+import { FormsModule } from '@angular/forms';
+import { ActivatedRoute, Router } from '@angular/router';
+import { AuthService } from '../../services/auth.service';
+
+@Component({
+ selector: 'app-login-register',
+ standalone: true,
+ imports: [CommonModule, FormsModule],
+ templateUrl: './login-register.component.html',
+})
+export class LoginRegisterComponent {
+ email: string = '';
+ password: string = '';
+ confirmPassword: string = '';
+ isLoginMode: boolean = true; // true: Login, false: Registration
+ errorMessage: string = '';
+
+ constructor(private authService: AuthService, private route: ActivatedRoute, private router: Router) {}
+
+ ngOnInit(): void {
+ // Set mode based on query parameter "mode"
+ this.route.queryParamMap.subscribe(params => {
+ const mode = params.get('mode');
+ this.isLoginMode = mode !== 'register';
+ });
+ }
+
+ toggleMode(): void {
+ this.isLoginMode = !this.isLoginMode;
+ this.errorMessage = '';
+ }
+
+ // Login with Email
+ onSubmit(): void {
+ this.errorMessage = '';
+ if (this.isLoginMode) {
+ this.authService
+ .loginWithEmail(this.email, this.password)
+ .then(userCredential => {
+ console.log('Successfully logged in:', userCredential);
+ this.router.navigate([`home`]);
+ })
+ .catch(error => {
+ console.error('Error during email login:', error);
+ this.errorMessage = error.message;
+ });
+ } else {
+ // Registration mode: also check if passwords match
+ if (this.password !== this.confirmPassword) {
+ console.error('Passwords do not match');
+ this.errorMessage = 'Passwords do not match.';
+ return;
+ }
+ this.authService
+ .registerWithEmail(this.email, this.password)
+ .then(userCredential => {
+ console.log('Successfully registered:', userCredential);
+ })
+ .catch(error => {
+ console.error('Error during registration:', error);
+ if (error.code === 'auth/email-already-in-use') {
+ this.errorMessage = 'This email address is already in use. Please try logging in.';
+ } else {
+ this.errorMessage = error.message;
+ }
+ });
+ }
+ }
+
+ // Login with Google
+ loginWithGoogle(): void {
+ this.errorMessage = '';
+ this.authService
+ .loginWithGoogle()
+ .then(userCredential => {
+ console.log('Successfully logged in with Google:', userCredential);
+ })
+ .catch(error => {
+ console.error('Error during Google login:', error);
+ this.errorMessage = error.message;
+ });
+ }
+}
diff --git a/bizmatch/src/app/components/logout/logout.component.ts b/bizmatch/src/app/components/logout/logout.component.ts
index 2224433..8d8ad06 100644
--- a/bizmatch/src/app/components/logout/logout.component.ts
+++ b/bizmatch/src/app/components/logout/logout.component.ts
@@ -1,7 +1,8 @@
import { CommonModule } from '@angular/common';
import { Component } from '@angular/core';
-import { RouterModule } from '@angular/router';
+import { Router, RouterModule } from '@angular/router';
import { KeycloakService } from 'keycloak-angular';
+import { AuthService } from '../../services/auth.service';
@Component({
selector: 'logout',
@@ -10,8 +11,10 @@ import { KeycloakService } from 'keycloak-angular';
template: ``,
})
export class LogoutComponent {
- constructor(public keycloakService: KeycloakService) {
- sessionStorage.removeItem('USERID');
- keycloakService.logout(window.location.origin + '/home');
+ constructor(public keycloakService: KeycloakService, private authService: AuthService, private router: Router) {
+ //sessionStorage.removeItem('USERID');
+ //keycloakService.logout(window.location.origin + '/home');
+ this.authService.logout();
+ this.router.navigate(['/home']);
}
}
diff --git a/bizmatch/src/app/guards/auth.guard.ts b/bizmatch/src/app/guards/auth.guard.ts
index 5d208f7..ef894d6 100644
--- a/bizmatch/src/app/guards/auth.guard.ts
+++ b/bizmatch/src/app/guards/auth.guard.ts
@@ -1,42 +1,54 @@
import { Injectable } from '@angular/core';
-import { ActivatedRouteSnapshot, Router, RouterStateSnapshot, UrlTree } from '@angular/router';
-import { KeycloakAuthGuard, KeycloakService } from 'keycloak-angular';
-import { KeycloakInitializerService } from '../services/keycloak-initializer.service';
+import { CanActivate, Router } from '@angular/router';
+import { AuthService } from '../services/auth.service';
import { createLogger } from '../utils/utils';
const logger = createLogger('AuthGuard');
@Injectable({
providedIn: 'root',
})
-export class AuthGuard extends KeycloakAuthGuard {
- constructor(protected override readonly router: Router, protected readonly keycloak: KeycloakService, private keycloakInitializer: KeycloakInitializerService) {
- super(router, keycloak);
- }
+// export class AuthGuard extends KeycloakAuthGuard {
+// constructor(protected override readonly router: Router, protected readonly keycloak: KeycloakService, private keycloakInitializer: KeycloakInitializerService) {
+// super(router, keycloak);
+// }
- async isAccessAllowed(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise {
- logger.info(`--->AuthGuard`);
- while (!this.keycloakInitializer.initialized) {
- logger.info(`Waiting 100 msec`);
- await new Promise(resolve => setTimeout(resolve, 100));
- }
- // Force the user to log in if currently unauthenticated.
- const authenticated = this.keycloak.isLoggedIn();
- //this.keycloak.isTokenExpired()
- if (!this.authenticated && !authenticated) {
- await this.keycloak.login({
- redirectUri: window.location.origin + state.url,
- });
- // return false;
- }
+// async isAccessAllowed(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise {
+// logger.info(`--->AuthGuard`);
+// while (!this.keycloakInitializer.initialized) {
+// logger.info(`Waiting 100 msec`);
+// await new Promise(resolve => setTimeout(resolve, 100));
+// }
+// // Force the user to log in if currently unauthenticated.
+// const authenticated = this.keycloak.isLoggedIn();
+// //this.keycloak.isTokenExpired()
+// if (!this.authenticated && !authenticated) {
+// await this.keycloak.login({
+// redirectUri: window.location.origin + state.url,
+// });
+// // return false;
+// }
- // Get the roles required from the route.
- const requiredRoles = route.data['roles'];
+// // Get the roles required from the route.
+// const requiredRoles = route.data['roles'];
- // Allow the user to proceed if no additional roles are required to access the route.
- if (!Array.isArray(requiredRoles) || requiredRoles.length === 0) {
+// // Allow the user to proceed if no additional roles are required to access the route.
+// if (!Array.isArray(requiredRoles) || requiredRoles.length === 0) {
+// return true;
+// }
+
+// // Allow the user to proceed if all the required roles are present.
+// return requiredRoles.every(role => this.roles.includes(role));
+// }
+// }
+export class AuthGuard implements CanActivate {
+ constructor(private authService: AuthService, private router: Router) {}
+
+ async canActivate(): Promise {
+ const token = await this.authService.getToken();
+ if (token) {
return true;
+ } else {
+ this.router.navigate(['/login-register']);
+ return false;
}
-
- // Allow the user to proceed if all the required roles are present.
- return requiredRoles.every(role => this.roles.includes(role));
}
}
diff --git a/bizmatch/src/app/interceptors/auth.interceptor.ts b/bizmatch/src/app/interceptors/auth.interceptor.ts
new file mode 100644
index 0000000..d60f564
--- /dev/null
+++ b/bizmatch/src/app/interceptors/auth.interceptor.ts
@@ -0,0 +1,25 @@
+// auth.interceptor.ts
+import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
+import { Injectable } from '@angular/core';
+import { Observable, from } from 'rxjs';
+import { switchMap } from 'rxjs/operators';
+import { AuthService } from '../services/auth.service';
+
+@Injectable()
+export class AuthInterceptor implements HttpInterceptor {
+ constructor(private authService: AuthService) {}
+
+ intercept(req: HttpRequest, next: HttpHandler): Observable> {
+ return from(this.authService.getToken()).pipe(
+ switchMap(token => {
+ if (token) {
+ const clonedReq = req.clone({
+ setHeaders: { Authorization: `Bearer ${token}` },
+ });
+ return next.handle(clonedReq);
+ }
+ return next.handle(req);
+ }),
+ );
+ }
+}
diff --git a/bizmatch/src/app/pages/details/details-business-listing/details-business-listing.component.ts b/bizmatch/src/app/pages/details/details-business-listing/details-business-listing.component.ts
index e396e29..3cc3f62 100644
--- a/bizmatch/src/app/pages/details/details-business-listing/details-business-listing.component.ts
+++ b/bizmatch/src/app/pages/details/details-business-listing/details-business-listing.component.ts
@@ -25,6 +25,7 @@ import { SharedModule } from '../../../shared/shared/shared.module';
import { createMailInfo, map2User } from '../../../utils/utils';
// Import für Leaflet
// Benannte Importe für Leaflet
+import { AuthService } from '../../../services/auth.service';
import { BaseDetailsComponent } from '../base-details.component';
@Component({
selector: 'app-details-business-listing',
@@ -80,6 +81,7 @@ export class DetailsBusinessListingComponent extends BaseDetailsComponent {
private auditService: AuditService,
public emailService: EMailService,
private geoService: GeoService,
+ private authService: AuthService,
) {
super();
this.router.events.subscribe(event => {
@@ -92,7 +94,8 @@ export class DetailsBusinessListingComponent extends BaseDetailsComponent {
}
async ngOnInit() {
- const token = await this.keycloakService.getToken();
+ // const token = await this.keycloakService.getToken();
+ const token = await this.authService.getToken();
this.keycloakUser = map2User(token);
if (this.keycloakUser) {
this.user = await this.userService.getByMail(this.keycloakUser.email);
diff --git a/bizmatch/src/app/pages/details/details-commercial-property-listing/details-commercial-property-listing.component.ts b/bizmatch/src/app/pages/details/details-commercial-property-listing/details-commercial-property-listing.component.ts
index b5fa0bd..7a34f0b 100644
--- a/bizmatch/src/app/pages/details/details-commercial-property-listing/details-commercial-property-listing.component.ts
+++ b/bizmatch/src/app/pages/details/details-commercial-property-listing/details-commercial-property-listing.component.ts
@@ -17,6 +17,7 @@ import { ValidatedNgSelectComponent } from '../../../components/validated-ng-sel
import { ValidatedTextareaComponent } from '../../../components/validated-textarea/validated-textarea.component';
import { ValidationMessagesService } from '../../../components/validation-messages.service';
import { AuditService } from '../../../services/audit.service';
+import { AuthService } from '../../../services/auth.service';
import { HistoryService } from '../../../services/history.service';
import { ImageService } from '../../../services/image.service';
import { ListingsService } from '../../../services/listings.service';
@@ -84,13 +85,15 @@ export class DetailsCommercialPropertyListingComponent extends BaseDetailsCompon
private messageService: MessageService,
private auditService: AuditService,
private emailService: EMailService,
+ private authService: AuthService,
) {
super();
this.mailinfo = { sender: {}, email: '', url: environment.mailinfoUrl };
}
async ngOnInit() {
- const token = await this.keycloakService.getToken();
+ // const token = await this.keycloakService.getToken();
+ const token = await this.authService.getToken();
this.keycloakUser = map2User(token);
if (this.keycloakUser) {
this.user = await this.userService.getByMail(this.keycloakUser.email);
diff --git a/bizmatch/src/app/pages/details/details-user/details-user.component.ts b/bizmatch/src/app/pages/details/details-user/details-user.component.ts
index 6d8b628..a6ecfda 100644
--- a/bizmatch/src/app/pages/details/details-user/details-user.component.ts
+++ b/bizmatch/src/app/pages/details/details-user/details-user.component.ts
@@ -6,6 +6,7 @@ import { Observable } from 'rxjs';
import { BusinessListing, CommercialPropertyListing, User } from '../../../../../../bizmatch-server/src/models/db.model';
import { KeycloakUser, emailToDirName } from '../../../../../../bizmatch-server/src/models/main.model';
import { environment } from '../../../../environments/environment';
+import { AuthService } from '../../../services/auth.service';
import { HistoryService } from '../../../services/history.service';
import { ImageService } from '../../../services/image.service';
import { ListingsService } from '../../../services/listings.service';
@@ -46,6 +47,7 @@ export class DetailsUserComponent {
private imageService: ImageService,
public historyService: HistoryService,
public keycloakService: KeycloakService,
+ private authService: AuthService,
) {}
async ngOnInit() {
@@ -55,7 +57,8 @@ export class DetailsUserComponent {
this.businessListings = results[0];
this.commercialPropListings = results[1] as CommercialPropertyListing[];
//this.user$ = this.userService.getUserObservable();
- const token = await this.keycloakService.getToken();
+ // const token = await this.keycloakService.getToken();
+ const token = await this.authService.getToken();
this.keycloakUser = map2User(token);
this.companyOverview = this.sanitizer.bypassSecurityTrustHtml(this.user.companyOverview ? this.user.companyOverview : '');
this.offeredServices = this.sanitizer.bypassSecurityTrustHtml(this.user.offeredServices ? this.user.offeredServices : '');
diff --git a/bizmatch/src/app/pages/home/home.component.html b/bizmatch/src/app/pages/home/home.component.html
index 5e9dab0..92db789 100644
--- a/bizmatch/src/app/pages/home/home.component.html
+++ b/bizmatch/src/app/pages/home/home.component.html
@@ -5,8 +5,9 @@
Account
} @else {
- Log In
- Register
+ Log In
+ Register
+
}