oneblink / hapi-oauth2orize

A bridge between hapi and OAuth2orize
BSD 3-Clause "New" or "Revised" License
27 stars 17 forks source link

Hapi 12+ and yar bug fix #13

Open pabshazon opened 8 years ago

pabshazon commented 8 years ago

From https://github.com/hapijs/yar

Starting with Hapi 12 the request.session placeholder was removed. The guidance from Hapi maintainer Eran Hammer was for this and similar modules to move data storage away from request.session and use a more unique location. So, starting in 6.x.x the yar storage has been moved to request.yar

My solution:

index.js line 201 should be: request.yar.lazy(true);

index.js line 206 should be: session: request.yar,

Maybe you prefer a different approach to solve the issue

devinivy commented 8 years ago

Thanks! This module does require a little bit of maintenance right now to bring it up-to-date.

pabshazon commented 8 years ago

Come on, we can resurrect it :)

devinivy commented 8 years ago

I don't think it will take much work, aside from the fact that it's officially time to write some proper tests for this plugin!

pabshazon commented 8 years ago

@devinivy, I can take care of the testing. What testing libraries would you use? I like Jasmine + Frisby but they might not be the best to test chained calls... any library recommendation to dev the tests for the Oauth2 process?

devinivy commented 8 years ago

@pabshazon I would personally use lab!