From 6253fa6a4507261dae352cd79acbb5f7bd2072a1 Mon Sep 17 00:00:00 2001 From: Chen Asraf Date: Fri, 25 Nov 2022 17:09:38 +0200 Subject: [PATCH] chore: rename package [skip publish] --- README.md | 6 +++--- package.json | 4 ++-- src/example/server.ts | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index e7f4fb4..ea1ff1e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# otipi +# express-otp Incredibly simple TOTP authentication for your Node.JS/Express backend. @@ -13,10 +13,10 @@ See [src/example/server.ts](src/example/server.ts) for a fully working example u ### Initialize -First, use the `otipi` function to generate middleware and functions for your use: +First, use the `express-otp` function to generate middleware and functions for your use: ```typescript -const totp = otipi({ +const totp = otp({ // Any identifier that is for your app issuer: 'my-issuer', // This should return user information if a request contains a valid user diff --git a/package.json b/package.json index 6d9db00..fc83b07 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { - "name": "otipi", + "name": "express-otp", "version": "0.1.0", "description": "Easy auth with your admin endpoints using OTP", "main": "index.js", - "repository": "https://github.com/chenasraf/otipi", + "repository": "https://github.com/chenasraf/express-otp", "author": "Chen Asraf ", "license": "MIT", "scripts": { diff --git a/src/example/server.ts b/src/example/server.ts index e7a7244..2849f95 100644 --- a/src/example/server.ts +++ b/src/example/server.ts @@ -1,5 +1,5 @@ import express from 'express' -import otipi from '..' +import otp from '..' import dotenv from 'dotenv' dotenv.config() @@ -8,7 +8,7 @@ const app = express() const sampleUser = { id: 1, username: process.env.USER_NAME!, secret: process.env.USER_SECRET! } -const totp = otipi({ +const totp = otp({ issuer: 'my-issuer', getUser: (req) => { const user = [sampleUser].find((x) => x.username === req.query.username)