react-iframe-guard
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

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

Package Sidebar

Install

npm i react-iframe-guard

Weekly Downloads

4

Version

0.0.1

License

MIT

Unpacked Size

4.61 kB

Total Files

10

Last publish

Collaborators

  • zvs001