session.expires may not always be a Date object. When serialized and deserialized, it may return a string object. The comparison between session.expires and new Date() will have unexpected results.
Type of change
[X] Patch: Bug (non-breaking change which fixes an issue)
[ ] Minor: New feature (non-breaking change which adds functionality)
[ ] Major: Breaking change (fix or feature that would cause existing functionality to not work as expected)
Checklist
[X] I have added a changelog entry, prefixed by the type of change noted above
…Redis seralization.
WHY are these changes introduced?
Expectation:
verifyRequest
should work out of the box.Actual:
verifyRequest
redirects to the authRoute link even if the session has been successfully retrieved from the session store.WHAT is this pull request doing?
This fixes https://github.com/Shopify/koa-shopify-auth/issues/40
session.expires
may not always be a Date object. When serialized and deserialized, it may return a string object. The comparison betweensession.expires
andnew Date()
will have unexpected results.Type of change
Checklist