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

370
Vistas
OAuth2 Client Workflow: blocked a frame with origin localhost from accessing a cross-origin frame

I'm trying to do a OAuth2 workflow defined by Lightspeed POS in the following link: https://developers.lightspeedhq.com/resto-api/introduction/authentication/

Essentially goes like this: step1: send Get request to https://test.lightspeedapis.com/resto/oauth2/v1/authorize?response_type=code&client_id=CLIENT_ID&state=authenticated&redirect_uri=https://localhost

step2: after entering credentials of box in browser and then click the "Allow" button, redirect to the specified redirect_uri with state=authenticated&code=AUTHORIZATION_CODE

step3: now with the AUTHORIZATION_CODE in the redirect url from step2, getting access_token can be done programmatically, by sending POST request to lightspeed token endpoint with AUTHORIZATION_CODE, client_id, client_secret in body and then parsing the returned json response.

I have a client app that I am integrating with lightspeed and they want to trigger the popup or iframe from their website, lets say : www.mysystem.com .

I cannot find a way to programmatically get that code from the response. I can call this page as a popup or iframe just fine, but I cannot then get that code from the response programatically.

The issue is that when trying to embed the lightspeed login page inside an iframe, it gives a cross-origin-policy error. When attempting to embed the authorization page inside an iframe in Web App, it gives an error pertaining to the Content Security Policy of the host website. When attempting to open a popup with the login page, the page will appear and the user may log in without any hiccups. However, it is impossible for webapp to query the url of said popup window, giving an error stating it blocked the site from accessing a cross-origin frame

enter image description here enter image description here What are possible solutions to this??

about 4 years ago · Juan Pablo Isaza
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