milimetric / passport-mediawiki-oauth

npm module for the oauth protocol on mediawiki sites
MIT License
5 stars 5 forks source link

Be more lax about token time limit #1

Closed jdlrobson closed 5 years ago

jdlrobson commented 6 years ago

While testing locally against MediaWiki, I found on various occasions this test failed, as the token was not completely in sync with my local time (maybe an issue with my/MediaWiki's clock)

Allowing 1 second either side of the token removed all these problems. I don't know enough about the oauth spec to know if this will be an issue but it was causing me a lot of headaches during development at the hackathon!

milimetric commented 5 years ago

I'm sorry I should've just merged this right away. Let me know if you'd like a release. I looked around a lot for any other oauth library I can refactor this on top of, but there seems to be nothing. I guess this hacky code is as good as it's going to get.