Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

369
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!