# feathers-authentication-popups-github

> Server plugin for GitHub OAuth2 popup-based login

Latest version **1.0.2** (published 2016-12-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install feathers-authentication-popups-github
pnpm add feathers-authentication-popups-github
yarn add feathers-authentication-popups-github
bun add feathers-authentication-popups-github
```

## 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.2 |
| Published | 2016-12-14 |
| First published | 2016-11-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 4.6.0 |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Feathers contributors |
| Maintainers | marshallswain |
| Keywords | feathers, feathers-plugin |

## Links

- npm: https://www.npmjs.com/package/feathers-authentication-popups-github
- Repository: https://github.com/feathersjs/feathers-authentication-popups-github
- Issues: https://github.com/feathersjs/feathers-authentication-popups-github/issues
- npm.io page: https://npm.io/package/feathers-authentication-popups-github

## Dependencies (5)

- [debug](https://npm.io/package/debug.md) ^2.2.0
- [feathers-errors](https://npm.io/package/feathers-errors.md) ^2.4.0
- [passport-github](https://npm.io/package/passport-github.md) ^1.1.0
- [feathers-authentication-oauth2](https://npm.io/package/feathers-authentication-oauth2.md) ^0.2.3
- [feathers-authentication-popups](https://npm.io/package/feathers-authentication-popups.md) ^0.1.2

## Alternatives

- [@fortawesome/react-fontawesome](https://npm.io/package/@fortawesome/react-fontawesome.md) — 2.2M weekly downloads
- [roboto-fontface](https://npm.io/package/roboto-fontface.md) — 196.0K weekly downloads
- [@react-native-vector-icons/common](https://npm.io/package/@react-native-vector-icons/common.md) — 150.4K weekly downloads
- [@procore/core-icons](https://npm.io/package/@procore/core-icons.md) — 4.6K weekly downloads
- [@react-md/material-icons](https://npm.io/package/@react-md/material-icons.md) — 1.6K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2016-12-14
- 1.0.1 — 2016-12-14
- 1.0.0 — 2016-12-14
- 0.0.3 — 2016-11-09
- 0.0.2 — 2016-11-09

## README

# feathers-authentication-popups-github

[![Build Status](https://travis-ci.org/feathersjs/feathers-authentication-popups-github.png?branch=master)](https://travis-ci.org/feathersjs/feathers-authentication-popups-github)
[![Code Climate](https://codeclimate.com/github/feathersjs/feathers-authentication-popups-github/badges/gpa.svg)](https://codeclimate.com/github/feathersjs/feathers-authentication-popups-github)
[![Test Coverage](https://codeclimate.com/github/feathersjs/feathers-authentication-popups-github/badges/coverage.svg)](https://codeclimate.com/github/feathersjs/feathers-authentication-popups-github/coverage)
[![Dependency Status](https://img.shields.io/david/feathersjs/feathers-authentication-popups-github.svg?style=flat-square)](https://david-dm.org/feathersjs/feathers-authentication-popups-github)
[![Download Status](https://img.shields.io/npm/dm/feathers-authentication-popups-github.svg?style=flat-square)](https://www.npmjs.com/package/feathers-authentication-popups-github)

> Server plugin for implementing OAuth2 popup-based GitHub logins

## Installation

```
npm install feathers-authentication-popups-github --save
```

## Documentation

Please refer to the [feathers-authentication-popups-github documentation](http://docs.feathersjs.com/ecosystem/feathers-authentication-popups-github/) for more details.

## Complete Example

Here's an example of a Feathers server that uses `feathers-authentication-popups-github`. 

```js
const feathers = require('feathers');
const rest = require('feathers-rest');
const hooks = require('feathers-hooks');
const bodyParser = require('body-parser');
const errorHandler = require('feathers-errors/handler');
const auth = require('feathers-authentication');
const githubAuth = require('feathers-authentication-popups-github');

// Initialize the application
const app = feathers()
  .configure(rest())
  .configure(hooks())
  // Needed for parsing bodies (login)
  .use(bodyParser.json())
  .use(bodyParser.urlencoded({ extended: true }))
  // Initialize your feathers plugin
  .use(errorHandler());

// First you need a config
var config = {
  "host": "localhost",
  "port": 3030,
  "public": "../public/",
  "auth": {
    "cookie": {
      "name": "feathers-jwt",
      "enabled": true,
      "secure": false
    },
    "token": {
      "secret": "your token secret here"
    },
    "jwt": {
      "issuer": "feathers",
      "algorithm": "HS256",
      "expiresIn": "1d"
    },
    "user": {
      "service": "/api/users",
      "idField": "_id",
      "usernameField": "email", 
      "passwordField": "password" 
    },
    "local": {},
    "github": {
      "provider": "github",
      "service": "auth/github",
      "successRedirect": "/auth/success",
      "callbackURL": "/auth/github/callback",
      "clientID": "your client id from GitHub",
      "clientSecret": "your client secret from GitHub",
      "permissions": {
        "scope": []
      }
    }
  }
};

app.configure(auth())
  // Enable GitHub popup-based OAuth.
  .configure(githubAuth(config.github, config.cookie));


app.listen(3030);

console.log('Feathers app started on 127.0.0.1:3030');
```

## License

Copyright (c) 2016

Licensed under the [MIT license](LICENSE).

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