# passport-praisecharts

> praisecharts authentication strategy for Passport.

Latest version **0.0.2** (published 2021-12-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install passport-praisecharts
pnpm add passport-praisecharts
yarn add passport-praisecharts
bun add passport-praisecharts
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2021-12-17 |
| First published | 2021-12-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.4.0 |
| Dependencies | 2 |
| Unpacked size | 12.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Isaiah Dahl |
| Maintainers | isaiahdahl |
| Keywords | passport, praisecharts, auth, authn, authentication, identity |

## Links

- npm: https://www.npmjs.com/package/passport-praisecharts
- Repository: https://github.com/PraiseCharts/passport-praisecharts
- Homepage: https://github.com/PraiseCharts/passport-praisecharts#readme
- Issues: http://github.com/PraiseCharts/passport-praisecharts/issues
- npm.io page: https://npm.io/package/passport-praisecharts

## Dependencies (2)

- [xtraverse](https://npm.io/package/xtraverse.md) 0.1.x
- [passport-oauth1](https://npm.io/package/passport-oauth1.md) 1.x.x

## Alternatives

- [@clerk/clerk-expo](https://npm.io/package/@clerk/clerk-expo.md) — 133.6K weekly downloads
- [@pothos/plugin-authz](https://npm.io/package/@pothos/plugin-authz.md) — 12.4K weekly downloads
- [@bounded-sh/client](https://npm.io/package/@bounded-sh/client.md) — 3.2K weekly downloads
- [@luigi-project/plugin-auth-oauth2](https://npm.io/package/@luigi-project/plugin-auth-oauth2.md) — 2.3K weekly downloads
- [@nocobase/plugin-verification](https://npm.io/package/@nocobase/plugin-verification.md) — 2.0K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2021-12-17
- 0.0.1 — 2021-12-17

## README

# passport-praisecharts

[Passport](http://passportjs.org/) strategy for authenticating with [PraiseCharts](http://praisecharts.com/)
using the OAuth 1.0a API.

This module lets you authenticate using PraiseCharts in your Node.js applications.
By plugging into Passport, PraiseCharts authentication can be easily and
unobtrusively integrated into any application or framework that supports
[Connect](http://www.senchalabs.org/connect/)-style middleware, including
[Express](http://expressjs.com/).


[![npm](https://img.shields.io/npm/v/passport-praisecharts.svg)](https://www.npmjs.com/package/passport-praisecharts)
[![build](https://img.shields.io/travis/jaredhanson/passport-praisecharts.svg)](https://travis-ci.org/jaredhanson/passport-praisecharts)
[![coverage](https://img.shields.io/coveralls/jaredhanson/passport-praisecharts.svg)](https://coveralls.io/github/jaredhanson/passport-praisecharts)
[...](https://github.com/jaredhanson/passport-praisecharts/wiki/Status)

## Install

```bash
$ npm install passport-praisecharts
```

## Usage

#### Create an Application

Before using `passport-praisecharts`, you must register an application with PraiseCharts.
If you have not already done so, a new application can be created at
[PraiseCharts Application Management](https://apps.praisecharts.com/).  Your application
will be issued a consumer key (API Key) and consumer secret (API Secret), which
need to be provided to the strategy.  You will also need to configure a callback
URL which matches the route in your application.

#### Configure Strategy

The PraiseCharts authentication strategy authenticates users using a PraiseCharts account
and OAuth tokens.  The consumer key and consumer secret obtained when creating
an application are supplied as options when creating the strategy.  The strategy
also requires a `verify` callback, which receives the access token and
corresponding secret as arguments, as well as `profile` which contains the
authenticated user's PraiseCharts profile.   The `verify` callback must call `cb`
providing a user to complete authentication.

```javascript
passport.use(new PraiseChartsStrategy({
    consumerKey: TWITTER_CONSUMER_KEY,
    consumerSecret: TWITTER_CONSUMER_SECRET,
    callbackURL: "http://127.0.0.1:3000/auth/praisecharts/callback"
  },
  function(token, tokenSecret, profile, cb) {
    User.findOrCreate({ praisechartsId: profile.id }, function (err, user) {
      return cb(err, user);
    });
  }
));
```

#### Authenticate Requests

Use `passport.authenticate()`, specifying the `'praisecharts'` strategy, to
authenticate requests.

For example, as route middleware in an [Express](http://expressjs.com/)
application:

```javascript
app.get('/auth/praisecharts',
  passport.authenticate('praisecharts'));

app.get('/auth/praisecharts/callback', 
  passport.authenticate('praisecharts', { failureRedirect: '/login' }),
  function(req, res) {
    // Successful authentication, redirect home.
    res.redirect('/');
  });
```

## Examples

Developers using the popular [Express](http://expressjs.com/) web framework can
refer to an [example](https://github.com/passport/express-4.x-praisecharts-example)
as a starting point for their own web applications.

## License

[The MIT License](http://opensource.org/licenses/MIT)

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