Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signatures do not expire #34

Open
darrynten opened this issue Aug 12, 2019 · 7 comments
Open

Signatures do not expire #34

darrynten opened this issue Aug 12, 2019 · 7 comments
Assignees

Comments

@darrynten
Copy link
Contributor

The verifyRequest method does not check the freshness of the signature, which means the signatures are still valid after expiration on Shopify.

It should be possible to configure an expiration and check the timestamp at L524.

@gnikyt
Copy link
Owner

gnikyt commented Aug 12, 2019

@darrynten Ah, would there ever be a situation where this would happen? (maybe on webhooks running?)

I guess a simple check of timestamp is within the last 5-10 mins?

@gnikyt gnikyt self-assigned this Aug 12, 2019
@gnikyt
Copy link
Owner

gnikyt commented Aug 19, 2019

Hey @darrynten Just seeing if you seen the above ;) what do you suggest.

@darrynten
Copy link
Contributor Author

According to the Shopify docs it seems like this value is returned from Shopify themselves when doing oauth.

image

@darrynten
Copy link
Contributor Author

I guess a simple check of timestamp is within the last 5-10 mins?

I think it's a little more complex than this. What value does Shopify return?

@gnikyt
Copy link
Owner

gnikyt commented Aug 21, 2019

Ah this is for online tokens through however, it doesn't give an expires for offline tokens I don't believe.

@asacarter
Copy link

Would it be a good idea to return the expires_in, so that we can set a cookie that expires at the same time and use a cache instead of sending requests on every page load?

@gnikyt
Copy link
Owner

gnikyt commented Mar 30, 2021

Yes, going to put this in my todos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants