# rise-auth-foundation

> ## Install

Latest version **0.0.3** (published 2023-01-13) · ISC license · 0 weekly downloads

## Install

```sh
npm install rise-auth-foundation
pnpm add rise-auth-foundation
yarn add rise-auth-foundation
bun add rise-auth-foundation
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2023-01-13 |
| First published | 2023-01-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 2.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | garysjennings |

## Links

- npm: https://www.npmjs.com/package/rise-auth-foundation
- npm.io page: https://npm.io/package/rise-auth-foundation

## Dependencies (1)

- [bcryptjs](https://npm.io/package/bcryptjs.md) ^2.4.3

## Recent versions

- 0.0.3 (latest) — 2023-01-13
- 0.0.2 — 2023-01-12
- 0.0.1 — 2023-01-11

## README

# Rise Auth Foundation

## Install

```
npm i rise-auth-foundation
```

## Usage

### createPasswordHash

```js
import { createPasswordHash } from 'rise-auth-foundation'
const hash = createPasswordHash('12341234')
```

### validatePassword

```js
import { validatePassword } from 'rise-auth-foundation'
const isValid = validatePassword('12341234', hash)
```

### makeSessionId

```js
import { makeSessionId } from 'rise-auth-foundation'
const sessionId = makeSessionId()
```

### setCookieHttpResponse

```js
import { setCookieHttpResponse } from 'rise-auth-foundation'
export const handler = async () => {
    const sessionId = '123...'
    return setCookieHttpResponse(sessionId)
}
```

### getSessionCookieFromApiEvent

```js
import { getSessionCookieFromApiEvent } from 'rise-auth-foundation'
export const handler = async (e) => {
    const sessionId = getSessionCookieFromApiEvent(e)
}
```

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