Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

251
Views
¿Cómo agregar Firebase JWT a una solicitud HTTP angular?

Tengo mi propio servicio HTTP que proporciona métodos GET, POST, PUT y DELETE y me permite enviar el JWT desde mi usuario de Firebase en el encabezado de la solicitud HTTP.

Ahora puedo obtener mi objeto de usuario de una tienda redux y puedo recuperar el JWT a través del método getIdToken() en este objeto de usuario. Desafortunadamente, este método me proporciona Promise<string> .

¿Hay alguna manera de que pueda construir mi objeto Http-Options con este JWT-Header, antes de enviar la solicitud a través del HttpClient de Angular?

Mi código:

 async delete<T = any>(appendix: string): Observable<T> { const options: any = await this.httpOptions(); return this.http.delete<T>(this.url + appendix, options); } private async httpOptions(): Promise<{ headers: { uid: string } }> { const user: User = this.authQuery.getValue(); const token: string = await user.getIdToken().catch(); return { headers: {uid: token}, }; }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!