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

263
Visualizações
JWT Authentication Header not working on ISO (Safari browser)

My problem

I'm protecting my API's with oAuth JWT tokens. This is set when the user is logged in and stored in a localStorage afterwards. This token is then parsed as an Authentication header in the request.

This works fine on desktops browsers like Chrome and FireFox. However, this does not work from ISO Safari applicaiton.

Research

Based on my own investigation (Https requests with Authorization not working via Safari) the error could be with Safari overwritting the Authentication header. Thus, I tried to implement a custom header instead, but the result is the same.

I have confirmed that when logging in on ISO the JWT token is created correctly, so I know the problem is not with the generation of the token itself.

Used Technologies

I'm using Axios in my HTTP Request, VueJS in my frontend, Node.js on my serverside and MongoDB as a database. Below, I have copied my request statement where I parse the JWT in a custom header:

let token = localStorage.getItem("jwt")
      axios({
        method: 'post',
        url: 'http://localhost:4000/test/',
        headers: {
            'Content-Type': 'application/json',
            'token': 'Bearer ' + token
        },
        data: {
          email: "test@test.com"
        }
      }).then(function (response) {
            console.log(response);
          }).catch(function (error) {
            console.log(error);
          });
    }

Anyone know a solution for this? Based on my research of the problem, I can see others are facing the same, but the proposed solutions unfortunatly not helped me.

Thank you in advance.

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