Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

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

Closed
wants to merge 2 commits into from

Conversation

ardeearam
Copy link

…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 #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

  • 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

  • I have added a changelog entry, prefixed by the type of change noted above
  • I have added/updated tests for this change

@paulomarg
Copy link
Contributor

Hey @ardeearam, thank you for your contribution! This is actually a bug in the underlying library which we are already fixing: Shopify/shopify-api-js#132.

I'm going to close this PR since that fix should also cover this!

@paulomarg paulomarg closed this Mar 15, 2021
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

App prefix doesn't work
2 participants