Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.then( connectUrl => {
const popupMonitor = new PopupMonitor();
popupMonitor.open(
connectUrl,
`connect-to-instagram-popup`,
'toolbar=0,location=0,menubar=0,' + popupMonitor.getScreenCenterSpecs( 700, 700 )
);
popupMonitor.on( 'message', ( { keyring_id } ) => {
setIsConnecting( false );
if ( keyring_id ) {
const token = keyring_id.toString();
setAttributes( { accessToken: token } );
setSelectedAccount( token );
}
} );