Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jaredhanson/passport
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ee57813037914642906aa9ed9e1c9ecbebf905ff
Choose a base ref
...
head repository: jaredhanson/passport
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c33067bc5aa81a6dd827076d810bf788bb6acac7
Choose a head ref

Commits on Aug 29, 2015

  1. Copy the full SHA
    a3c0867 View commit details

Commits on Sep 26, 2015

  1. added social auth examples

    mjhea0 committed Sep 26, 2015
    Copy the full SHA
    bd286fe View commit details

Commits on Nov 9, 2015

  1. Copy the full SHA
    3307575 View commit details

Commits on Mar 10, 2016

  1. Copy the full SHA
    8f97412 View commit details

Commits on Mar 12, 2016

  1. Update request.js

    Fix typo
    kulakowka committed Mar 12, 2016
    Copy the full SHA
    6e37662 View commit details

Commits on Mar 31, 2016

  1. Merge pull request #469 from kulakowka/patch-2

    Update request.js
    jaredhanson committed Mar 31, 2016
    Copy the full SHA
    fae549b View commit details
  2. Merge pull request #468 from kulakowka/patch-1

    Highlight examples in README.md
    jaredhanson committed Mar 31, 2016
    Copy the full SHA
    38d8451 View commit details
  3. Merge pull request #418 from mjhea0/patch-4

    added social auth examples
    jaredhanson committed Mar 31, 2016
    Copy the full SHA
    6212c97 View commit details
  4. Merge pull request #404 from DaAwesomeP/master

    Add syntax highlighting to README
    jaredhanson committed Mar 31, 2016
    Copy the full SHA
    cb4cfd8 View commit details

Commits on Apr 1, 2016

  1. Update support files.

    jaredhanson committed Apr 1, 2016
    Copy the full SHA
    29e3bb6 View commit details
  2. Copy the full SHA
    269e686 View commit details
  3. Copy the full SHA
    6bc59cb View commit details

Commits on Apr 29, 2016

  1. Fixed typo

    alexanderweiss committed Apr 29, 2016
    Copy the full SHA
    3a2adda View commit details

Commits on May 19, 2016

  1. Merge pull request #481 from alexanderweiss/patch-1

    Fixed typo in authenticate.js
    jaredhanson committed May 19, 2016
    Copy the full SHA
    07bff37 View commit details

Commits on Jun 1, 2016

  1. Code cosmetics

    murashki committed Jun 1, 2016
    Copy the full SHA
    63a267e View commit details

Commits on Aug 5, 2016

  1. Merge pull request #1 from jaredhanson/master

    Bring fork up to date
    danielsharvey authored Aug 5, 2016
    Copy the full SHA
    be92845 View commit details
  2. Add documentation for message and flash options

    Add documentation to the authenticate() method for options
    `successMessage`, `successFlash`, `failureMessage` and
    `failureFlash`.
    
    Add documentation for the optional `status` argument of the
    callback method.
    Daniel Harvey committed Aug 5, 2016
    Copy the full SHA
    4c3dbec View commit details
  3. Bring fork up to date

    Merge branch 'master' of https://github.com/danielsharvey/passport
    into passport-doco-updates.
    Daniel Harvey committed Aug 5, 2016
    Copy the full SHA
    9502d99 View commit details

Commits on Sep 25, 2016

  1. Update README.md

    mjhea0 authored Sep 25, 2016
    Copy the full SHA
    4bf16eb View commit details

Commits on Sep 26, 2016

  1. Merge pull request #507 from mjhea0/patch-5

    Update README.md
    jaredhanson authored Sep 26, 2016
    Copy the full SHA
    e3e9878 View commit details

Commits on Oct 10, 2016

  1. Merge pull request #501 from danielsharvey/passport-doco-updates

    Passport doco updates
    jaredhanson authored Oct 10, 2016
    Copy the full SHA
    ad5fe1d View commit details
  2. Merge pull request #491 from murashki/master

    session.js code cosmetics
    jaredhanson authored Oct 10, 2016
    Copy the full SHA
    3eaafe4 View commit details
  3. Copy the full SHA
    5d22e4e View commit details

Commits on Oct 26, 2016

  1. Copy the full SHA
    ee334e3 View commit details

Commits on Dec 1, 2016

  1. Merge pull request #517 from brandwe/patch-1

    Adding Azure Active Directory as example
    jaredhanson authored Dec 1, 2016
    Copy the full SHA
    8de1c66 View commit details

Commits on Jul 2, 2017

  1. Copy the full SHA
    88dc173 View commit details
  2. Merge pull request #585 from ryysud/enable-more-version-on-travis

    Enable node 6, 7 and 8 on Travis CI.
    jaredhanson authored Jul 2, 2017
    Copy the full SHA
    c0c7f8e View commit details

Commits on Aug 11, 2017

  1. Copy the full SHA
    997dc51 View commit details
  2. Copy the full SHA
    c5bde3f View commit details
  3. Copy the full SHA
    a23d8bd View commit details
  4. Copy the full SHA
    50cc57a View commit details
  5. Copy the full SHA
    3337f7b View commit details
  6. Merge pull request #598 from jaredhanson/sessionmgr

    Factor session access into session manager.
    jaredhanson authored Aug 11, 2017
    Copy the full SHA
    597e289 View commit details
  7. 0.4.0

    jaredhanson committed Aug 11, 2017
    3
    Copy the full SHA
    fc0fdc8 View commit details

Commits on Sep 16, 2017

  1. Copy the full SHA
    821a474 View commit details

Commits on Nov 30, 2017

  1. Copy the full SHA
    906a0ec View commit details
  2. Copy the full SHA
    13c550c View commit details

Commits on Dec 13, 2017

  1. Add sponsorship.

    jaredhanson committed Dec 13, 2017
    Copy the full SHA
    9125409 View commit details

Commits on Jan 23, 2018

  1. Update sponsorship links

    Eric Berry authored Jan 23, 2018
    Copy the full SHA
    2f24254 View commit details

Commits on Jan 24, 2018

  1. Merge pull request #649 from coderberry/master

    Update sponsorship links
    jaredhanson authored Jan 24, 2018
    Copy the full SHA
    0736707 View commit details

Commits on Feb 22, 2018

  1. Copy the full SHA
    57584dd View commit details

Commits on Feb 28, 2018

  1. Merge pull request #652 from matheushf/patch-2

    Update Strategies count from HomePage
    jaredhanson authored Feb 28, 2018
    Copy the full SHA
    df6e2b7 View commit details

Commits on Apr 4, 2018

  1. Remove sponsorship.

    jaredhanson committed Apr 4, 2018
    Copy the full SHA
    42aa9a3 View commit details
  2. Update status badges.

    jaredhanson committed Apr 4, 2018
    Copy the full SHA
    fa296ee View commit details
  3. Copy the full SHA
    8ac66b4 View commit details
  4. Copy the full SHA
    0a66012 View commit details
  5. Add GitHub templates.

    jaredhanson committed Apr 4, 2018
    Copy the full SHA
    d784e17 View commit details
  6. Update README.

    jaredhanson committed Apr 4, 2018
    Copy the full SHA
    e458838 View commit details

Commits on Apr 28, 2018

  1. Update sponsors.

    jaredhanson committed Apr 28, 2018
    Copy the full SHA
    2327a36 View commit details

Commits on Oct 8, 2018

  1. Update GitHub templates.

    jaredhanson committed Oct 8, 2018
    Copy the full SHA
    8ea4f24 View commit details
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
github: jaredhanson
patreon: jaredhanson
ko_fi: jaredhanson
53 changes: 53 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
** READ THIS FIRST! **

#### Are you looking for help?

Reminder: The issue tracker is not a support forum.

Issues should only be filed in this project once they are able to be reproduced
and confirmed as a flaw in the software or incorrect information in associated
documention.

If you are encountering problems integrating this module into your application,
please post a question on the [discussion forum](https://github.com/passport/discuss)
rather than filing an issue.

#### Is this a security issue?

Do not open issues that might have security implications. Potential security
vulnerabilities should be reported privately to jaredhanson@gmail.com. Once any
vulerabilities have been repaired, the details will be disclosed publicly in a
responsible manner. This also allows time for coordinating with affected parties
in order to mitigate negative consequences.


If neither of the above two scenarios apply to your situation, you should open
an issue. Delete this paragraph and the text above, and fill in the information
requested below.

<!-- Provide a brief summary of the issue in the title field above. -->

<!-- Provide a detailed description of your use case, including as much -->
<!-- detail as possible about what you are trying to accomplish and why. -->

### Expected behavior
<!-- Provide a detailed description of how you expected the software to -->
<!-- behave. -->

### Actual behavior
<!-- Provide a detailed description of how the software actually behaved, -->
<!-- including any rationale for why that behavior is incorrect. -->

### Steps to reproduce
<!-- Provide an unambiguous series of steps that can be used to reproduce -->
<!-- this issue, including any code if applicable. -->

```js
// Format code using Markdown code blocks
```

### Environment

* Operating System:
* Node version: <!-- $ node -v -->
* passport version: <!-- $ npm list passport -->
41 changes: 41 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
** READ THIS FIRST! **

#### Are you implementing a new feature?

Requests for new features should first be discussed on the [developer forum](https://github.com/passport/develop).
This allows the community to gather feedback and assess whether or not there is
an existing way to achieve the desired functionality.

If it is determined that a new feature needs to be implemented, include a link
to the relevant discussion along with the pull request.

#### Is this a security patch?

Do not open pull requests that might have security implications. Potential
security vulnerabilities should be reported privately to jaredhanson@gmail.com.
Once any vulerabilities have been repaired, the details will be disclosed
publicly in a responsible manner. This also allows time for coordinating with
affected parties in order to mitigate negative consequences.


If neither of the above two scenarios apply to your situation, you should open
a pull request. Delete this paragraph and the text above, and fill in the
information requested below.

<!-- Provide a brief summary of the request in the title field above. -->

<!-- Provide a detailed description of your use case, including as much -->
<!-- detail as possible about what you are trying to accomplish and why. -->
<!-- If this patch closes an open issue, include a reference to the issue -->
<!-- number. -->

### Checklist

<!-- Place an `x` in the boxes that apply. If you are unsure, please ask and -->
<!-- we will help. -->

- [ ] I have read the [CONTRIBUTING](https://github.com/jaredhanson/passport/blob/master/CONTRIBUTING.md) guidelines.
- [ ] I have added test cases which verify the correct operation of this feature or patch.
- [ ] I have added documentation pertaining to this feature or patch.
- [ ] The automated test suite (`$ make test`) executes successfully.
- [ ] The automated code linting (`$ make lint`) executes successfully.
42 changes: 42 additions & 0 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version:
- '17'
- '16'
- '14'
- '12'
- '10'
- '8'
- '6'
- '4'
# - '3' # io.js
# - '2' # io.js
# - '1' # io.js
- '0.12'
- '0.10'
# - '0.8'

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
build/
docs/
reports/

# Node.js
node_modules/
npm-debug.log

# Mac OS X
.DS_Store

# Node.js
node_modules
npm-debug.log
18 changes: 3 additions & 15 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
CONTRIBUTING.md
Makefile
README.md
build/
SPONSORS.md
docs/
examples/
reports/
support/
test/

# Node.js
.npmignore
node_modules/
npm-debug.log

# Mac OS X
.DS_Store

# Git
.git*

# Utilities
.github/
.jshintrc
.travis.yml
27 changes: 22 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
language: "node_js"
node_js:
- "13"
- "12"
- "11"
- "10"
- "9"
- "8"
- "7"
- "6"
- "5"
- "4"
- "3" # io.js
- "2" # io.js
- "1" # io.js
- "0.12"
- "0.10"
- "iojs"
# - "0.8"


before_install:
- "npm install istanbul -g"
- "npm install coveralls -g"
- "npm install make-node@0.3.x -g"
- "preinstall-compat"

script: "make ci-travis"
script:
- "make test-cov"

after_success:
- "make submit-cov-to-coveralls"
- "make report-cov"

sudo: false
64 changes: 64 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.6.0] - 2022-05-20
### Security

- Improved robustness against session fixation attacks in cases where there is
physical access to the same system or the application is susceptible to
cross-site scripting (XSS).

## [0.5.3] - 2022-05-16
### Fixed

- `initialize()` middleware extends request with `login()`, `logIn()`,
`logout()`, `logOut()`, `isAuthenticated()`, and `isUnauthenticated()` functions
again, reverting change from 0.5.1.

## [0.5.2] - 2021-12-16
### Fixed
- Introduced a compatibility layer for strategies that depend directly on
`passport@0.4.x` or earlier (such as `passport-azure-ad`), which were
broken by the removal of private variables in `passport@0.5.1`.

## [0.5.1] - 2021-12-15
### Added
- Informative error message in session strategy if session support is not
available.

### Changed

- `authenticate()` middleware, rather than `initialize()` middleware, extends
request with `login()`, `logIn()`, `logout()`, `logOut()`, `isAuthenticated()`,
and `isUnauthenticated()` functions.

## [0.5.0] - 2021-09-23
### Changed

- `initialize()` middleware extends request with `login()`, `logIn()`,
`logout()`, `logOut()`, `isAuthenticated()`, and `isUnauthenticated()`
functions.

### Removed

- `login()`, `logIn()`, `logout()`, `logOut()`, `isAuthenticated()`, and
`isUnauthenticated()` functions no longer added to `http.IncomingMessage.prototype`.

### Fixed

- `userProperty` option to `initialize()` middleware only affects the current
request, rather than all requests processed via singleton Passport instance,
eliminating a race condition in situations where `initialize()` middleware is
used multiple times in an application with `userProperty` set to different
values.

[Unreleased]: https://github.com/jaredhanson/passport/compare/v0.6.0...HEAD
[0.6.0]: https://github.com/jaredhanson/passport/compare/v0.5.3...v0.6.0
[0.5.3]: https://github.com/jaredhanson/passport/compare/v0.5.2...v0.5.3
[0.5.2]: https://github.com/jaredhanson/passport/compare/v0.5.1...v0.5.2
[0.5.1]: https://github.com/jaredhanson/passport/compare/v0.5.0...v0.5.1
20 changes: 20 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## Contributing

### Tests

The test suite is located in the `test/` directory. All new features are
expected to have corresponding test cases with complete code coverage. Patches
that increase test coverage are happily accepted.

Ensure that the test suite passes by executing:

```bash
$ make test
```

Coverage reports can be generated and viewed by executing:

```bash
$ make test-cov
$ make view-cov
```
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2011-2015 Jared Hanson
Copyright (c) 2011-2021 Jared Hanson

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
50 changes: 14 additions & 36 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,47 +1,25 @@
SOURCES ?= lib/*.js lib/**/*.js
TESTS ?= test/*.test.js test/**/*.test.js
include node_modules/make-node/main.mk

test: test-mocha
test-cov: test-istanbul-mocha
view-cov: view-istanbul-report
lint: lint-jshint
lint-tests: lint-tests-jshint

SOURCES = lib/*.js lib/**/*.js
TESTS = test/*.test.js test/**/*.test.js

# ==============================================================================
# Node.js
# ==============================================================================
include support/mk/node.mk
include support/mk/mocha.mk
include support/mk/istanbul.mk
LCOVFILE = ./reports/coverage/lcov.info

# ==============================================================================
# Analysis
# ==============================================================================
include support/mk/notes.mk
include support/mk/jshint.mk
MOCHAFLAGS = --require ./test/bootstrap/node

# ==============================================================================
# Reports
# ==============================================================================
include support/mk/coveralls.mk

# ==============================================================================
# Continuous Integration
# ==============================================================================
submit-cov-to-coveralls: submit-istanbul-lcov-to-coveralls
view-docs:
open ./docs/index.html

# Travis CI
ci-travis: test test-cov
view-cov:
open ./reports/coverage/lcov-report/index.html

# ==============================================================================
# Clean
# ==============================================================================
clean:
rm -rf build
rm -rf reports
clean: clean-docs clean-cov
-rm -r $(REPORTSDIR)

clobber: clean clobber-node
clobber: clean
-rm -r node_modules


.PHONY: test test-cov view-cov lint lint-tests submit-cov-to-coveralls ci-travis clean clobber
.PHONY: clean clobber
Loading