https://github.com/judahh/mauth
Authentication and Authorization Middleware
https://github.com/judahh/mauth
auth authentication authorization back-end backend javascript middleware midware nodejs permission typescript
Last synced: 4 months ago
JSON representation
Authentication and Authorization Middleware
- Host: GitHub
- URL: https://github.com/judahh/mauth
- Owner: Judahh
- License: bsd-3-clause
- Created: 2021-07-17T11:16:04.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2025-06-13T09:31:59.000Z (about 1 year ago)
- Last Synced: 2025-07-08T05:06:07.869Z (12 months ago)
- Topics: auth, authentication, authorization, back-end, backend, javascript, middleware, midware, nodejs, permission, typescript
- Language: TypeScript
- Homepage:
- Size: 1.6 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 41
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# MAuth

[](https://badge.fury.io/js/%40midware%2Fmauth)
[](https://img.shields.io/npm/dt/%40midware%2Fmauth.svg)
Authentication and Authorization Middleware
## Installation
This is a [Node.js](https://nodejs.org/en/) module available through the
[npm registry](https://www.npmjs.com/).
Before installing,
[download and install Node.js](https://nodejs.org/en/download/).
If this is a brand new project, make sure to create a `package.json` first with
the [`npm init` command](https://docs.npmjs.com/creating-a-package-json-file) or
[`yarn init` command](https://classic.yarnpkg.com/en/docs/cli/init/).
Installation is done using the
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally)
or [`yarn add` command](https://classic.yarnpkg.com/en/docs/cli/add):
```bash
$ npm install @midware/mauth
```
or
```bash
$ yarn add @midware/mauth
```
## Features
- Ready to use authorization middleware
- Ready to use authentication middleware
- Simple implementation
## Tests
To run the test suite, first install the dependencies, then run `npm test`:
```bash
$ npm install
$ npm test
```
or
```bash
$ yarn
$ yarn test
```
## Environment Variables:
GOOGLE_CLIENT_ID = Google Client Id
AUTH_HOST = Auth host URL to get keys
JWT_PRIVATE_KEY = RSA Private Key to generate JWT
JWT_PUBLIC_KEY = RSA Public Key to get JWT
SERVICE_NAME = Credential id to connect to Auth host
SERVICE_KEY = Credential KEY to connect to Auth host
SERVICE_NAME = Project name
INSTANCE = Project instance name
## People
The original author of MAuth is [Judah Lima](https://github.com/Judahh)
[List of all contributors](https://github.com/Judahh/mauth/graphs/contributors)