login(email: string, password: string) : Observable<any> {
const httpOptions = {
headers: new HttpHeaders({
'Content-Type': 'application/json',
'Authorization': 'Basic ' + btoa(`${email}:${password}`)
}),
observe: 'response' as 'body' // Optional: Use this if you need the full response
};
return this.http.get(`${this.baseUrl}/api/token`,httpOptions);
}
whenever I call this function in service it gives me browser popup to enter username and password. I'm already passing that