Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
client_id: config( 'wpcom_signup_id' ),
client_secret: config( 'wpcom_signup_key' ),
};
const args = {
path: '/me/social-login/connect',
body: body,
};
/*
* Before attempting the social connect, we reload the proxy.
* This ensures that the proxy iframe has set the correct API cookie,
* particularly after the user has logged in, but Calypso hasn't
* been reloaded yet.
*/
require( 'wpcom-proxy-request' ).reloadProxy();
this.wpcom.req.post( { metaAPI: { accessAllUsersBlogs: true } } );
return this.wpcom.req.post( args, fn );
};
UndocumentedMe.prototype.preferences = MePreferences;
client_id: config( 'wpcom_signup_id' ),
client_secret: config( 'wpcom_signup_key' ),
};
const args = {
path: '/me/social-login/connect',
body: body,
};
/*
* Before attempting the social connect, we reload the proxy.
* This ensures that the proxy iframe has set the correct API cookie,
* particularly after the user has logged in, but Calypso hasn't
* been reloaded yet.
*/
require( 'wpcom-proxy-request' ).reloadProxy();
this.wpcom.req.post( { metaAPI: { accessAllUsersBlogs: true } } );
return this.wpcom.req.post( args, fn );
};
new Promise( resolve => {
proxy( req, ( err, body, xhr ) => {
resolve( {
status: xhr.status === undefined ? 200 : xhr.status,
body,
error: err,
} );
} );
} )
;