Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

154
Visualizações
Authenticating to a remote API with a server application

I've been working on doing client-side only applications for a while. And the way I used to connect to an API (that I have control over) was to make a basic authentication using login/password and to create a JWT token on the server, save it in an HttpOnly + Secure cookie, and send it back to the client application when the flow has succeeded.

Today, I have to work on an application that handles parts of the computation on the server and where I process my form on the backend (looks a bit like PHP). The flow is the following:

  • I enter my credential in the browser and I submit the form
  • I get my data and make some validations in the server part of the frontend application
  • Then, I make a query to my remote API and ask for authenticating the user, I get a cookie back — on the server.

My questions are:

  • is it safe to forward the cookie to the client through my intermediate layer?
  • does it exist a better way to manage authentication when an intermediate server is implied (even if the server is part of the frontend)

Thanks for your help

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda