Installation¶
React-Auth-Kit is available as a npm package.
The package also contains the type definitions, so if you are using TypeScript, this package will also work. You don't have to install any other package.
Npm ¶
To install and save in your package.json
dependencies, run:
npm install --save react-auth-kit
Yarn ¶
yarn add react-auth-kit
Please note that react >= 16, js-cookie = 2.2.1 and react-router-dom = 6.0 are peer dependencies.
CDN ¶
You can start using React-Auth-Kit with minimal infrastructure, which is great for prototyping.
Two Universal Module Definition (UMD) files are provided:
- unpkg: https://unpkg.com/react-auth-kit@2.5.0/dist/index.umd.js
-
jsdelivr: https://cdn.jsdelivr.net/npm/react-auth-kit@2.5.0/dist/index.umd.js
You can follow this CDN example to quickly get started.
Using this approach in production
is discouraged
though - the client has to download the entire library,
regardless of which components are actually used, affecting performance and bandwidth utilization.
The UMD links are using the latest
tag to point to the latest version of the library. This pointer is unstable
,
it shifts as we release new versions. You should consider pointing to a specific version,
such as v1.4.6.
— 🔑 —
React Auth Kit is Apache 2.0 License code