rise-auth-foundation

0.0.3 • Public • Published

Rise Auth Foundation

Install

npm i rise-auth-foundation

Usage

createPasswordHash

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

validatePassword

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

makeSessionId

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

setCookieHttpResponse

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

getSessionCookieFromApiEvent

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

Readme

Keywords

none

Package Sidebar

Install

npm i rise-auth-foundation

Weekly Downloads

5

Version

0.0.3

License

ISC

Unpacked Size

2.75 kB

Total Files

4

Last publish

Collaborators

  • garysjennings