@krishkrosh/repl-auth
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Repl Authentication

Repl Authentication is a simple way to allow users to log in, and access their information.

Get started

const express = require('express'); 
const { getUserInfo } = require('../index.js')

const app = express();
app.use(express.static('public'));

app.get('/', async function(req, res) {
  const userInfo = getUserInfo(req)
  console.log(userInfo)
}

Docs

getUserInfo(Request req)

Gets all user info. Returns object.

const userInfo = getUserInfo(req)

Tests

npm run test

Then login and assure that it says "server tests passed"

Readme

Keywords

none

Package Sidebar

Install

npm i @krishkrosh/repl-auth

Weekly Downloads

2

Version

1.0.2

License

MIT

Unpacked Size

57.1 kB

Total Files

13

Last publish

Collaborators

  • krishkrosh