0.0.1 • Published 3 years ago

react-iframe-guard v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Library help to secure component from accessing from IFrame. It designed to solve Click-Jacking attack.

npm

Usage

Secure component which should not be accessed via iFrame. Child components will be visible, only when website is opened as /a top level window.

import IFrameGuard from 'react-iframe-guard'

class Auth extends React.Component {
  render() {
    return (
      <IFrameGuard>
        <AuthForm />
      </IFrameGuard>
    )
  }
}

Props

  • rejectComponent - component which will be displayed in iFrame