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

201
Visualizações
How to login the user to an external page and redirect the user there?

I'm currently trying to find a way to redirect the user to an external protected page, for example foo.com/dashboard. I have the user login credentials and auth cookie for the page. So my question is that how I can redirect the user to that page already logged in, so the user doesn't have to login, I do the login? I will have to add an Cookie header to the request, but it isn't possible with html.

For example, my website is bar.com and I have the users auth cookie to foo.com.

i want to be able to redirect the user to the dashboard

<a href="foo.com/dashboard">dashboard</a>, but it's not possible to add a header to a html link.

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I have the user login credentials and auth cookie for the page. So my question is that how I can redirect the user to that page already logged in

In general, you can't.

There is no way to set cookies for a different origin. That would be a major security problem.

It might be possible to submit the login credentials to the login mechanism on the other site, but that would depend on the site supporting a login mechanism that allowed it (e.g. a form submission) and not doing anything that would prevent it (such as CSRF defences or a CAPTCHA).

Directing them to a specific page there would require support for that (e.g. the login form supporting a "go to page X after login" parameter).

about 4 years ago · Santiago Trujillo Relatório
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