# passport-artikcloud

> ARTIK Cloud authentication strategy for Passport.

Latest version **1.0.1** (published 2016-10-04) · MIT license · 0 weekly downloads

## Install

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

## 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.1 |
| Published | 2016-10-04 |
| First published | 2016-09-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Inho Oh |
| Maintainers | webispy |
| Keywords | passport, artikcloud, artik, oauth2 |

## Links

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

## 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

- 1.0.1 (latest) — 2016-10-04
- 1.0.0 — 2016-09-30

## README

# passport-artikcloud

[Passport](http://passportjs.org/) strategy for authenticating with [ARTIK Cloud](http://artik.cloud/)
using the OAuth 2.0 API.

## Install

    $ npm install passport-artikcloud

## Usage

#### Configure Strategy

```js
passport.use(new ARTIKCloudStrategy({
    clientID: EXAMPLE_CLIENT_ID,
    clientSecret: EXAMPLE_CLIENT_SECRET,
    callbackURL: "http://localhost:3000/auth/example/callback"
  },
  function(accessToken, refreshToken, profile, cb) {
    User.findOrCreate({ exampleId: profile.id }, function (err, user) {
      return cb(err, user);
    });
  }
));
```

#### Authenticate Requests

```js
app.get('/auth/example',
  passport.authenticate('artikcloud'));

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

## License

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

Copyright (c) 2016 Inho Oh <webispy@gmail.com>

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