# passport-winkv2

> Wink OAuth2 strategy for Passport

Latest version **0.0.1** (published 2017-09-19) · MIT license · 0 weekly downloads

## Install

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

## 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.1 |
| Published | 2017-09-19 |
| First published | 2017-09-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >0.10.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | tuddman |
| Maintainers | nibbler |
| Keywords | passport, wink, auth, authentication |

## Links

- npm: https://www.npmjs.com/package/passport-winkv2
- Repository: https://github.com/Nibbler999/passport-wink
- Issues: https://github.com/Nibbler999/passport-wink/issues
- npm.io page: https://npm.io/package/passport-winkv2

## Dependencies (1)

- [passport-oauth2](https://npm.io/package/passport-oauth2.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.1 (latest) — 2017-09-19

## README

# Passport-Wink

[Passport](https://github.com/jaredhanson/passport) strategy for authenticating
with [Wink](http://wink.com) using the OAuth 2.0 API.

## Install

    $ npm install passport-wink

## Usage

#### Configure Strategy

The Wink authentication strategy authenticates users using a Wink
account and OAuth 2.0 tokens.  The strategy requires a `verify` callback, which
accepts these credentials and calls `done` providing a user, as well as
`options` specifying a client ID, client secret, and callback URL.

    passport.use(new WinkStrategy({
        clientID: CLIENT_ID,
        clientSecret: CLIENT_SECRET,
        callbackURL : CALLBACK_URL
      },
      function(accessToken, refreshToken, profile, done) {
        User.findOrCreate({ WinkId: profile.id }, function (err, user) {
          return done(err, user);
        });
      }
    ));

#### Authenticate Requests

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

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

    app.get('/auth/wink',
      passport.authorize('wink'));

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

## Thanks

  - [Jared Hanson](http://github.com/jaredhanson)
  - [Michael Pearson](http://github.com/mjpearson)

## License

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

Copyright (c) 2015 tuddman <[http://github.com/tuddman](http://github.com/tuddman)>

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