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

377
Visualizações
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 à 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