# fuse-cognito-login

> - How to debug

Latest version **1.9.0** (published 2026-11-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install fuse-cognito-login
pnpm add fuse-cognito-login
yarn add fuse-cognito-login
bun add fuse-cognito-login
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.9.0 |
| Published | 2026-11-19 |
| First published | 2023-05-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 1.4 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | besmir |
| Maintainers | christoph-orcaya, endrits079, besi |

## Links

- npm: https://www.npmjs.com/package/fuse-cognito-login
- Repository: https://gitlab.com/brickfox/login-ui
- Homepage: https://gitlab.com/brickfox/login-ui#readme
- Issues: https://gitlab.com/brickfox/login-ui/issues
- npm.io page: https://npm.io/package/fuse-cognito-login

## Dependencies (5)

- [jwt-decode](https://npm.io/package/jwt-decode.md) ^4.0.0
- [qrcode.react](https://npm.io/package/qrcode.react.md) ^3.1.0
- [react-otp-input](https://npm.io/package/react-otp-input.md) ^3.1.0
- [crypto-browserify](https://npm.io/package/crypto-browserify.md) ^3.12.0
- [amazon-cognito-identity-js](https://npm.io/package/amazon-cognito-identity-js.md) ^6.3.7

## Recent versions

- 1.9.0 (latest) — 2026-11-19
- 1.8.0 — 2026-11-18
- 1.7.0 — 2026-06-18
- 1.6.66 — 2024-01-26
- 1.6.65 — 2024-01-15
- 1.6.64 — 2024-01-15
- 1.6.63 — 2024-01-15
- 1.6.62 — 2024-01-12
- 1.6.61 — 2024-01-12
- 1.6.60 — 2024-01-12
- 1.6.59 — 2024-01-12
- 1.6.58 — 2024-01-12
- 1.6.57 — 2024-01-12
- 1.6.56 — 2024-01-12
- 1.6.55 — 2024-01-12
- … 161 more at https://npm.io/package/fuse-cognito-login/versions

## README

# To use this library

- How to debug

In your package.json, you can write this line.

```json
  "fuse-cognito-login": "file:/path/to/this/project/npm-cognito-package",
```

```bash
yarn
```

- How to publish

version up in package.json
```bash
./publish.sh
```

- Add follows to your package.json

```json
"browser": {
  "crypto": false
},
```

- Install peer-dependencies to your project

- Add follows to index.js

```react
import { CookiesProvider } from "react-cookie";
    <CookiesProvider>
      <App />
    </CookiesProvider>
```

- Make and use `utils/fuse-lib.js`

- Logo image file: `public/logo.jpg`

- Background image file: `public/bg.jpg`

- define `REACT_APP_TENANTHUB_API_BASEURL` in .env file

- Timezone picker (since 1.9.0)

`Utils.getTimezones(axios)` loads the TenantHub catalog from `GET /api/timezones` and resolves to `[]` when the request fails. `Components.TimezoneAutocomplete` is the picker the profile page uses: a controlled component with `value` (an IANA id or `null`), `onChange(id | null)`, `options`, `label`, `disabled` and `disableClearable`.

```javascript
import { Components, Utils } from "fuse-cognito-login";

const timezones = await Utils.getTimezones(axios);
<Components.TimezoneAutocomplete value={timezone} onChange={setTimezone} options={timezones} label="Timezone" />
```

- Refresh Token

-- Install `usehooks-ts` to use `useInterval`
-- Add followings to `AppLayout.js`

```javascript
import { useInterval } from "usehooks-ts";
import { refreshAuth } from "utils/fuse-lib";
const refreshTokenInterval = 4 * 60 * 60 * 1000; // 4 hours
const AppLayout = () => {
  // ...
  useInterval(() => refreshAuth(), refreshTokenInterval);
  // ...
}
```

---
_Source: https://npm.io/package/fuse-cognito-login · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
