Shopify / koa-shopify-auth

DEPRECATED Middleware to authenticate a Koa application with Shopify
MIT License
80 stars 63 forks source link

Fix: convert session.expires to Date first. Might be a string due to … #69

Closed ardeearam closed 3 years ago

ardeearam commented 3 years ago

…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 between session.expires and new Date() will have unexpected results.

Type of change

Checklist

ardeearam commented 3 years ago

Please refer to https://github.com/Shopify/koa-shopify-auth/pull/70.

Closed, changed branch.