Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

158
Vistas
Keeping user logged in outside of an iframe

I'm using Laravel and Vue in an SPA and am integrating my app with another app. The second app has my app in an iframe. However, once my app is loaded in their iframe and a user is authenticated, I would like the user to have the option to open my app outside of the iframe by clicking on a button. After authenticating the user on my server, my plan was to send the JWT back to the client and then log in the user with the token (this is while my app is within the other app's iframe):

await this.$store.dispatch('auth/saveToken', {
  token: token
})

If I refresh the page within the iframe, then the user is logged in, so I know that this is working.

However, when I try to open in a new tab:

let route = this.$router.resolve({ path: this.url })
 window.open(route.href)

the user is logged out.

Am I missing a step so that the user will stay logged in even if the app opens in a new tab and outside of the original iframe?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

i think because of change browser, because iframe is different or you app is different, so you have to manage token for login if it's come on new browser, and you are not able to get token after store in vuex you need to pass in url or any other way.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda