Skip to content

Passport v0.6.0(latest) incompatibility with cookie-session  #2

@jtouris

Description

@jtouris

Issue Overview

Hi, I would like to know what suggestions/workaround you recommend to the current problem related to passport v0.6.0 incompatibility with cookie-session v2.0.0. Application throws error TypeError: req.session.regenerate is not a function so this is currently a big limitation.
The workaround provided on passport's repo is to downgrade to 0.5.x but this approach is vulnerable to CVE-2022-25896

Describe your environment

  • Editor: VSCode
  • Browser: Google Chrome
  • Running on: MacBook Pro 2.6 GHz 6-Core Intel Core i7

Steps to Reproduce

  1. install npm dependencies npm install
  2. configure database connection
  3. run project and try to login

Expected Behavior

  • User is able to Log in with proper credentials
  • User gets error message of invalid credentials (if user is not yet created or has invalid credentials)

Current Behavior

app crashes with: TypeError: req.session.regenerate is not a function

Possible Solution

downgrade passport version to 0.5.x but this approach is vulnerable to CVE-2022-25896

Screenshots / Video

Screen Shot 2022-10-27 at 8 21 03 PM

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions