Implement OIDC authentication
This commit is contained in:
committed by
Aditya Chandel
parent
548e09ae2c
commit
817b572c08
@@ -0,0 +1,21 @@
|
||||
import {inject, Injectable} from '@angular/core';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
import {Observable} from 'rxjs';
|
||||
import {API_CONFIG} from '../config/api-config';
|
||||
|
||||
export interface SetupPayload {
|
||||
email: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
@Injectable({providedIn: 'root'})
|
||||
export class SetupService {
|
||||
|
||||
private readonly url = `${API_CONFIG.BASE_URL}/api/v1/setup`;
|
||||
|
||||
private http = inject(HttpClient);
|
||||
|
||||
createAdmin(payload: SetupPayload): Observable<void> {
|
||||
return this.http.post<void>(this.url, payload);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user