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

@@ -25,6 +25,7 @@ import { ValidatedLocationComponent } from '../../../components/validated-locati
import { ValidatedQuillComponent } from '../../../components/validated-quill/validated-quill.component';
import { ValidatedSelectComponent } from '../../../components/validated-select/validated-select.component';
import { ValidationMessagesService } from '../../../components/validation-messages.service';
import { AuthService } from '../../../services/auth.service';
import { GeoService } from '../../../services/geo.service';
import { ImageService } from '../../../services/image.service';
import { LoadingService } from '../../../services/loading.service';
@@ -97,6 +98,7 @@ export class AccountComponent {
private subscriptionService: SubscriptionsService,
private datePipe: DatePipe,
private router: Router,
private authService: AuthService,
) {}
async ngOnInit() {
setTimeout(() => {
@@ -105,7 +107,8 @@ export class AccountComponent {
if (this.id) {
this.user = await this.userService.getById(this.id);
} else {
const token = await this.keycloakService.getToken();
// const token = await this.keycloakService.getToken();
const token = await this.authService.getToken();
const keycloakUser = map2User(token);
const email = keycloakUser.email;
this.user = await this.userService.getByMail(email);