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

Outdated php-jwt does not conform to specs, breaks my login flow #306

Closed
Kirill-TechHub opened this issue Apr 12, 2017 · 1 comment
Closed
Milestone

Comments

@Kirill-TechHub
Copy link

I am using Wordpress Version 4.7.3, trying to install the official Auth0 plugin on it for the first time.

My problem was that I could not login as an Auth0 user on my WP site, even though Auth0 showed no errors in the log. I've traced the problem to the php-jwt library, which rejected decoding the id token because of bad nbf & iat values. The timestamps in the token were a few seconds ahead of my server's time, so the "current time must be after NBF" check failed.

The official JWT specs say that this check is optional, and suggest providing a leeway of a couple of minutes to account for clock skew. I fixed my problem by adding a leeway of 120 seconds (the actual difference was around 2 seconds in my case).

Specification: https://tools.ietf.org/html/rfc7519#section-4.1.5

Currently used version of php-jwt in this plugin is outdated, but the up-to-date one has a $leeway property specifically for this case.

Please patch the plugin by updating the included php-jwt library and setting the $leeway value to a reasonable value.

@joshcanhelp
Copy link
Contributor

Fixed with #332

@joshcanhelp joshcanhelp added this to the 3.4.0 milestone Jan 25, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants