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

227
Visualizações
How to secure an variable so its not acessible by other code in javascript

currently I face the issue that I am building a modular Application that can run 3rd party Scripts within the interface, my concern now is that they grab the token and send over the Tab requests to the Server to steal Userdata. I had 3 Solutions in mind but I don't know if any of them is good, or if you maybe have a different Solution.

  1. I put the entire App within an Iframe and set it to sandbox mode. The issue with this might be performance, Code difficulties and my App needs an Iframe anyways, so I would have at the end an Iframe nested within an Iframe.
  2. I could generate a Token only for the editor, so for example that you have a specialized Token that can be used only for a few actions, and so by that, a bad code could not really do damage since they lack permissions.
  3. (The approach I would prefer to do) I somehow store the token in a way that you cannot access it, but that prerendered functions can use it to interact with the server.

So any ideas on how I could do this?

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