# oz-login

> install using `npm install oz-login`

Latest version **0.2.1** (published 2023-10-30) · 0 weekly downloads

## Install

```sh
npm install oz-login
pnpm add oz-login
yarn add oz-login
bun add oz-login
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2023-10-30 |
| First published | 2023-10-23 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 8 |
| Unpacked size | 1.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ozzz |

## Links

- npm: https://www.npmjs.com/package/oz-login
- npm.io page: https://npm.io/package/oz-login

## Dependencies (8)

- [react](https://npm.io/package/react.md) 18.2.0
- [react-dom](https://npm.io/package/react-dom.md) 18.2.0
- [@mui/material](https://npm.io/package/@mui/material.md) 5.14.1
- [react-scripts](https://npm.io/package/react-scripts.md) 5.0.1
- [@emotion/react](https://npm.io/package/@emotion/react.md) 11.11.1
- [react-toastify](https://npm.io/package/react-toastify.md) 9.1.3
- [@emotion/styled](https://npm.io/package/@emotion/styled.md) 11.11.0
- [@mui/icons-material](https://npm.io/package/@mui/icons-material.md) 5.14.1

## Recent versions

- 0.2.1 (latest) — 2023-10-30
- 0.2.0 — 2023-10-27
- 0.1.2 — 2023-10-26
- 0.1.1 — 2023-10-25
- 0.1.0 — 2023-10-23

## README

## react login module

### install

install using `npm install oz-login`

### usage 

In a react app, use the OzLogin components:

`import OzLogin from "oz-login";`

```
<OzLogin url={process.env.USER_API_URL}
    onSuccess={(data) => {

        localStorage.setItem("token_", data.token);

        localStorage.setItem("user_", JSON.stringify(data.user));
        
        window.location.href = "/"
    }}
/>
```

### css
```
.login {
    margin-top: calc(50vh - 173px);
    max-width: 400px;
    margin-left: calc(50vw - 207px);
    border-radius: 15px;
    border: solid;
}

.login-button {
    padding-top: 20px;
    text-align: center;
    padding-bottom: 15px;
}
```

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