Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bay0/react-app-protect
Password protect a react app.
https://github.com/bay0/react-app-protect
aes component cryptojs fingerprintjs password react wip
Last synced: about 1 month ago
JSON representation
Password protect a react app.
- Host: GitHub
- URL: https://github.com/bay0/react-app-protect
- Owner: bay0
- Created: 2020-12-23T00:15:00.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-07-13T05:30:52.000Z (over 3 years ago)
- Last Synced: 2024-04-26T00:16:04.136Z (9 months ago)
- Topics: aes, component, cryptojs, fingerprintjs, password, react, wip
- Language: CSS
- Homepage: https://bay0.github.io/react-app-protect/
- Size: 5.32 MB
- Stars: 14
- Watchers: 2
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-app-protect
> Password protect a react app.
> Simple password field, not a replacment for basic auth.
> Not secure at all.
[![NPM](https://img.shields.io/npm/v/react-app-protect.svg)](https://www.npmjs.com/package/react-app-protect) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
### ✨ [Demo](https://bay0.github.io/react-app-protect/)
###### password: test
## Install
```bash
npm install --save react-app-protect
yarn add react-app-protect
```> Using [FingerprintJS](https://github.com/fingerprintjs/fingerprintjs) to encrypt the password via AES.
> Storing the cipher in the localStorage.
> Checking if the stored cipher is valid against the sha512 hash.## Props
| Name | Type | Default | Description |
| ---------------- | ------- | -------------------------------- | ------------------------------- |
| sha512 | String | | SHA 512 Hash app |
| blur | Boolean | false | Blur the content |
| boxTitle | 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 |
| styles | Object | | Styles |## Usage
```jsx
import React, { Component } from 'react'import Protect from 'react-app-protect'
import 'react-app-protect/dist/index.css'class App extends Component {
render() {
return (
Content
)
}
}
```## License
MIT © [bay0](https://github.com/bay0)