# passport-emploi-store

> Emploi Store (OpenID) authentication strategy for Passport.

Latest version **0.3.1** (published 2017-02-21) · 0 weekly downloads

## Install

```sh
npm install passport-emploi-store
pnpm add passport-emploi-store
yarn add passport-emploi-store
bun add passport-emploi-store
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.3.1 |
| Published | 2017-02-21 |
| First published | 2017-02-21 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.6.0 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Younes Benaomar |
| Maintainers | interactive-object |
| Keywords | passport, emploistore, poleemploi, auth, auth, authentication, identity |

## Links

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

## Dependencies (2)

- [pkginfo](https://npm.io/package/pkginfo.md) 0.2.x
- [passport-openid](https://npm.io/package/passport-openid.md) 0.3.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.3.1 (latest) — 2017-02-21
- 0.3.0 — 2017-02-21

## README

# Passport-PoleEmploi

[Passport](https://github.com/jaredhanson/passport) strategy for authenticating
with [Emploi Store](http://www.emploi-store.fr/) using OpenID 2.0.

This module lets you authenticate using Pôle Emploi in your Node.js applications.
By plugging into Passport, Pôle emploi 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/).


## Install

    $ npm install passport-emploi-store

## Usage

#### Configure Strategy

The Emploi Store authentication strategy authenticates users using a Emploi Store account,
which is also an OpenID 2.0 identifier.  The strategy requires a `validate`
callback, which accepts this identifier and calls `done` providing a user.
Additionally, options can be supplied to specify a return URL and realm.

    passport.use(new EmploiStoreStrategy({
        returnURL: 'http://localhost:3000/auth/emploistore/return',
        realm: '/individu',
        response_type: 'code',
        client_id: 'XXXX',
        scope: 'application_XXXXX%20api_authentificationindividuv1%20openid%20profile%20email',
        state: 'STATE_ID',
        nonce: 'NOOCE'
      },
      function(identifier, done) {
        User.findByOpenID({ openId: identifier }, function (err, user) {
          return done(err, user);
        });
      }
    ));

#### Authenticate Requests

Use `passport.authenticate()`, specifying the `'emploi-store'` strategy, to
authenticate requests.

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

    app.get('/auth/emploistore',
      passport.authenticate('emploi-store'));

    app.get('/auth/emploistore/return', 
      passport.authenticate('emploi-store', { failureRedirect: '/login' }),
      function(req, res) {
        // Successful authentication, redirect home.
        res.redirect('/');
      });

## Examples

For a complete, working example, refer to the [signon example](https://github.com/InteractiveObject/passport-emploi-store/tree/master/examples/signon).

## Tests

    $ npm install --dev
    $ make test

[![Build Status](https://secure.travis-ci.org/InteractiveObject/passport-emploi-store.png)](http://travis-ci.org/jaredhanson/passport-emploi-store)


## License

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

Copyright (c) 2011-2017 Interactive Object <[https://interactive-object.com/](https://interactive-object.com/)>

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