hapi-auth-jwt2: Not compatible with Hapi 17.*

Hi, It is not working with Hapi 17.*. At least 'name' is missing, but may be some more issues.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 17
  • Comments: 16 (1 by maintainers)

Commits related to this issue

Most upvoted comments

@nelsonic v17 has been released now 😄

Any news regarding the v17? @nelsonic

It needs to be upgraded to support v17.

Anything new regarding the v17?

@murbanowicz thank you for opening this issue. Hapi V.17 has not been released yet. There is a “Release Candidate” so people can try it. We are waiting for the v.17 Release Notes: https://github.com/hapijs/hapi/issues/3658 As soon as the “Upgrade Path” notes are finalised we will do the work to upgrade our Plugin(s) and release a new major version to NPM.

This is not how it should be. The changes should be merged so npm will have it already

On 10 Jan 2018 09:30, “Salvatore Tedde” notifications@github.com wrote:

@teemuniiranen https://github.com/teemuniiranen see my comments, you need to install the fork

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dwyl/hapi-auth-jwt2/issues/248#issuecomment-356548616, or mute the thread https://github.com/notifications/unsubscribe-auth/AI80kgByyfJrGRLkbgUgg45E7FWMg1cOks5tJIM2gaJpZM4QKUwe .

Hi @murbanowicz I’ve downgraded and tested the deps one by one and I’ve managed to make it work. I will comment here for anyone with the same issue after upgrading hapi.js and hapi.js plugins.

  • “blipp”: “^2.3.0”,
  • “boom”: “^5.2.0”,
  • “good”: “^7.2.0”,
  • “good-console”: “^6.4.0”,
  • “good-squeeze”: “^5.0.2”,
  • “hapi”: “^16.5.2”,
  • “hapi-auth-jwt2”: “^7.3.0”,
  • “hapi-cors”: “^1.0.1”,
  • “hapi-postgres-connection”: “^6.2.0”,
  • “joi”: “^10.6.0”,

The problem seens to be, the newer versions of hapi.js and newers plugins don’t work properly with es2018 code style.

Its not working with me. “hapi”: “^17.5.4”, “hapi-auth-jwt2”: “^8.1.0”,

Upgrading from 16.x to 17.2 caused following Hapi AssertionError:

[ 'AssertionError [ERR_ASSERTION]: Authentication strategy jwt uses unknown scheme: jwt',
     '    at module.exports.internals.Auth._strategy (/data/app/node_modules/hapi/lib/auth.js:49:14)'

Seems like Hapi 17 is requiring scheme registration with server.auth.scheme function: https://github.com/hapijs/hapi/blob/master/API.md#authentication-scheme

Have someone got it working?