# authport-makerpass

> An AuthPort plugin for MakerPass

Latest version **1.0.0** (published 2016-08-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install authport-makerpass
pnpm add authport-makerpass
yarn add authport-makerpass
bun add authport-makerpass
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-08-11 |
| First published | 2016-08-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Gilbert |
| Maintainers | mindeavor |

## Links

- npm: https://www.npmjs.com/package/authport-makerpass
- Repository: https://github.com/reactorcore/authom-makerpass
- Homepage: https://github.com/reactorcore/authom-makerpass#readme
- Issues: https://github.com/reactorcore/authom-makerpass/issues
- npm.io page: https://npm.io/package/authport-makerpass

## Dependencies (1)

- [authport](https://npm.io/package/authport.md) >= 1.0.0

## Recent versions

- 1.0.0 (latest) — 2016-08-11

## README

# AuthPort MakerPass

    npm install --save authport-makerpass

## Example Use

```js
//
// Setup
//
var AuthPort = require('authport')
var MakerpassService = require('authport-makerpass')

if (! process.env.MAKERPASS_CLIENT_ID || ! process.env.MAKERPASS_CLIENT_SECRET) {
  throw new Error("Please set MAKERPASS_CLIENT_ID and MAKERPASS_CLIENT_SECRET")
}

AuthPort.registerService('makerpass', MakerpassService)

AuthPort.createServer({
  service: 'makerpass',
  id: process.env.MAKERPASS_CLIENT_ID,
  secret: process.env.MAKERPASS_CLIENT_SECRET,
  callbackURL: process.env.HOST + '/auth/makerpass/callback',
})

AuthPort.on('auth', function(req, res, data) {
  console.log("OAuth success!", data)
  req.session.accessToken = data.token
  res.redirect('/')
})

AuthPort.on('error', function(req, res, data) {
  console.log("OAuth failed.", data)
  res.status(500).send({ error: 'oauth_failed' })
})


//
// Adding to your express app
//
var express = require('express')
var app = express()

app.get("/auth/:service", AuthPort.app)

app.listen(4000)
```

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