Skip to content

Commit

Permalink
chore: 🤖 remove babel, node.js >= 12, upgrade dev tools, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
ghaiklor committed Jun 12, 2020
1 parent 2e2b4a9 commit 1e4eb3d
Show file tree
Hide file tree
Showing 18 changed files with 4,330 additions and 263 deletions.
4 changes: 0 additions & 4 deletions .babelrc

This file was deleted.

9 changes: 4 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
coverage
node_modules
20 changes: 20 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"env": {
"commonjs": true,
"es2020": true,
"node": true,
"mocha": true
},
"extends": [
"standard"
],
"parserOptions": {
"ecmaVersion": 11
},
"rules": {
"semi": [
"error",
"always"
]
}
}
132 changes: 118 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,38 +1,142 @@
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directory
node_modules
# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# Babel compiled sources
lib
# VisualStudioCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

# Miscellaneous
*~
*#
.DS_STORE
.netbeans
nbproject
.idea
.node_history
# Ignore all local history of files
.history
9 changes: 9 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"spec": "test/unit/**/*.test.js",
"reporter": "spec",
"recursive": true,
"exit": true,
"require": [
"test/bootstrap.js"
]
}
4 changes: 0 additions & 4 deletions .npmignore

This file was deleted.

7 changes: 7 additions & 0 deletions .nycrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"report-dir": "coverage",
"reporter": [
"lcov",
"text"
]
}
20 changes: 2 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
sudo: false
language: node_js
cache:
directories:
- node_modules
notifications:
email: true
node_js:
- stable
- 5
- 4
- 0.12
- 0.10
before_install:
- npm install -g npm@latest
before_script:
- npm prune
- node
- lts/*
after_success:
- npm run coveralls
branches:
except:
- "/^v\\d+\\.\\d+\\.\\d+$/"
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"cSpell.words": [
"Headerfor",
"Obrezkov",
"Penree",
"appsecret",
"authn",
"lcov"
]
}
71 changes: 20 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,30 @@

![Build Status](https://img.shields.io/travis/drudge/passport-facebook-token.svg)
![Coverage](https://img.shields.io/coveralls/drudge/passport-facebook-token.svg)

![Downloads](https://img.shields.io/npm/dm/passport-facebook-token.svg)
![Downloads](https://img.shields.io/npm/dt/passport-facebook-token.svg)
![npm version](https://img.shields.io/npm/v/passport-facebook-token.svg)
![License](https://img.shields.io/npm/l/passport-facebook-token.svg)

[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
![dependencies](https://img.shields.io/david/drudge/passport-facebook-token.svg)
![dev dependencies](https://img.shields.io/david/dev/drudge/passport-facebook-token.svg)

[Passport](http://passportjs.org/) strategy for authenticating with [Facebook](http://www.facebook.com/)
access tokens using the OAuth 2.0 API.
[Passport](http://passportjs.org/) strategy for authenticating with [Facebook](http://www.facebook.com/) access tokens using the OAuth 2.0 API.

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

## Installation

$ npm install passport-facebook-token
```shell
npm install passport-facebook-token
```

## Usage

### Configure Strategy

The Facebook authentication strategy authenticates users using a Facebook
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
The Facebook authentication strategy authenticates users using a Facebook 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 app ID and app secret.

```js
var FacebookTokenStrategy = require('passport-facebook-token');
const FacebookTokenStrategy = require('passport-facebook-token');

passport.use(new FacebookTokenStrategy({
clientID: FACEBOOK_APP_ID,
Expand Down Expand Up @@ -79,28 +69,28 @@ module.exports = {

### Client Requests

Clients can send requests to routes that use passport-facebook-token authentication using query parms, body, or HTTP headers. Clients will need to transmit the `access_token`
and optionally the `refresh_token` that are received from facebook after login.
Clients can send requests to routes that use passport-facebook-token authentication using query params, body, or HTTP headers.
Clients will need to transmit the `access_token` and optionally the `refresh_token` that are received from facebook after login.

#### Sending access_token as a Query parameter

```
```shell
GET /auth/facebook/token?access_token=<TOKEN_HERE>
```

#### Sending access token as an HTTP header

Clients can choose to send the access token using the Oauth2 Bearer token (RFC 6750) compliant format
Clients can choose to send the access token using the Oauth2 Bearer token (RFC 6750) compliant format.

```
```shell
GET /resource HTTP/1.1
Host: server.example.com
Authorization: Bearer base64_access_token_string
```

optionally a client can send via a custom (default access_token) header
Optionally a client can send via a custom (default access_token) header.

```
```shell
GET /resource HTTP/1.1
Host: server.example.com
access_token: base64_access_token_string
Expand All @@ -110,40 +100,19 @@ access_token: base64_access_token_string

Clients can transmit the access token via the body

```
```shell
POST /resource HTTP/1.1
Host: server.example.com

access_token=base64_access_token_string
```


## Credits

- [Nicholas Penree](http://github.com/drudge)
- [Jared Hanson](http://github.com/jaredhanson)
- [Eugene Obrezkov](http://github.com/ghaiklor)
- [Nicholas Penree](http://github.com/drudge)
- [Jared Hanson](http://github.com/jaredhanson)
- [Eugene Obrezkov](http://github.com/ghaiklor)

## License

The MIT License (MIT)

Copyright (c) 2015 Nicholas Penree

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
[MIT License](./LICENSE)
Loading

0 comments on commit 1e4eb3d

Please sign in to comment.