UNPKG

@ecomplus/passport-client

Version:

Handle customer authentication with E-Com Plus Passport

13 lines (11 loc) 438 B
export default url => { if (typeof window !== 'object') { throw new Error('Method available for browser only') } // create hidden iframe and append to body const iframe = document.createElement('iframe') iframe.setAttribute('src', url) iframe.setAttribute('name', 'E-Com Plus Passport for login and register') iframe.setAttribute('style', 'width:0;height:0;border:0;border:none;') document.body.appendChild(iframe) }