lundi 29 novembre 2021

Accessing third party location url [duplicate]

I have an application where you need to give permission to access files. The user clicks a button which opens a pop up window for the user to log in and allow access. The pop up window then redirects to a url which contains a code. I need to get this code from the url, so I can then send it to my API.

The issue I am having is I continue to get this error:

Uncaught DOMException: Blocked a frame with origin "http://localhost:3000" from accessing a cross-origin frame.

A preview of the code is as follows:

var windowReference;
    const openAccessWindow = async () => {
        if (windowReference == null || windowReference.closed) {
            windowReference = window.open(
                'https://sandbox-api.some_more_information',
                'Records', 'popup');
console.log(windowReference.location.href);

        } else {
            windowReference.focus()
        }
    }




Aucun commentaire:

Enregistrer un commentaire