-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Unauthorized response with default config #53
Comments
Thanks for the detailed analysis and report. |
Sorry I made a mistake reporting the version of Mercure I am using, the problem is with version 0.11.2 Darwin. |
I finally found the problem, is related to an outdated version of the library lcobucci/jwt. How can I force to download the correct version of lcobucci/jwt if i don't have the lcobucci/jwt in my composer.json? |
My problem was fixed with this commit: lcobucci/jwt@9a961f4#diff-0d6f5466b75090a80363ed372e9a41012c30ba4d1eedc2ebc60c5a89716cf681 So I ran And everything is working now Thanks |
I installed mercure-bundle in my symfony with default values, just switched the URL of mercure to the my own.
MERCURE_JWT_SECRET="!ChangeMe!"
And mercure is also running with default config.
SERVER_NAME=:3000 MERCURE_PUBLISHER_JWT_KEY='!ChangeMe!' MERCURE_SUBSCRIBER_JWT_KEY='!ChangeMe!' ./mercure run -config Caddyfile.dev
But i got an
Unauthorized
responseThen i tested in many ways to get it working and finally i found the problem:
When I copy the Token to decode it, the expiration date appears to be in an incorrect format.
If I remove the quotes, converting the string into decimal value, the expiration date appears to be correct.
Finally I tested with both tokens, first the token generated by symphony and then with decimal expiration date.
Mercure: 0.10.4 (Darwin)
Symfony: 5.2
Symfony mercure-bundle: 0.3.2
I don't know if it is a mistake done by me or is a real bug, i hope someone can help me.
Thanks
The text was updated successfully, but these errors were encountered: