Package Exports
- react-app-protect
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-app-protect) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
react-app-protect
Password protect a react app.
✨ Demo
password: test
Install
npm install --save react-app-protect
yarn add react-app-protect
Using FingerprintJS to encrypt the password via AES. Storing the cipher in the localStorage.
Props
Name | Type | Default | Description |
---|---|---|---|
password | String | Password for the react app | |
blur | Boolean | false | Blur the content |
title | String | This page is password protected. | Title of the login box |
inputPlaceholder | String | Password | Placeholder for the input field |
buttonLabel | String | Submit | Label used for the button |
wrapperClass | String | CSS class to wrap |
Usage
import React, { Component } from 'react'
import Protect from 'react-app-protect'
import 'react-app-protect/dist/index.css'
class App extends Component {
render() {
return (
<Protect password="test">
<div>Content</div>
</Protect>
)
}
}
License
MIT © bay0