2.4.0 • Published 1 month ago

dha-security v2.4.0

Weekly downloads
1
License
-
Repository
-
Last release
1 month ago

dha-security

A security module for the DHA SDK to help prevent malicious attacks on applications built with the SDK

Getting Started

Install

Install from npm:

  • npm i dha-security devtools-detect

Security Module

App.tsx - Functional component

import { CssBaseline, ThemeProvider } from '@material-ui/core';
import { Layout } from 'components';
import { Routes } from 'containers';
import { crashIfDevToolsOpened } from 'dha-security';
import React, { useEffect } from 'react';
import { Provider } from 'react-redux';
import { store } from 'redux/store';
import 'typeface-roboto';
import { theme } from './theme';

const App = () => {
  useEffect(() => {
    // If dev tools are opened, the application will crash.
    crashIfDevToolsOpened();
  }, []);

  return (
    <Provider store={store}>
      <ThemeProvider theme={theme}>
        <CssBaseline />
        <Layout>
          <Routes />
        </Layout>
      </ThemeProvider>
    </Provider>
  );
};

export default App;

App.tsx - Class component

import { CssBaseline, ThemeProvider } from '@material-ui/core';
import { Layout } from 'components';
import { Routes } from 'containers';
import { crashIfDevToolsOpened } from 'dha-security';
import React from 'react';
import { Provider } from 'react-redux';
import { store } from 'redux/store';
import 'typeface-roboto';
import { theme } from './theme';

class App extends React.Component {
  componentDidMount(): void {
    // If dev tools are opened, the application will crash.
    crashIfDevToolsOpened();
  }

  render() {
    return (
      <Provider store={store}>
        <ThemeProvider theme={theme}>
          <CssBaseline />
          <Layout>
            <Routes />
          </Layout>
        </ThemeProvider>
      </Provider>
    );
  }
}

export default App;

Contribute

see Github wiki

NPM

https://www.npmjs.com/package/dha-security

License

pending

2.4.0

1 month ago

2.3.2

1 month ago

2.2.0

2 months ago

2.1.0

11 months ago

2.0.0

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.3

3 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

5 years ago