Closed shubhamdhaboya closed 3 years ago
I struggled quite a lot today to subscribe to private channels and I came up with this solution (I'm using this to comunicate with a symfony server api):
I request my server the mercure cookie, which is a HTTP header shaped like this =>
Set-Cookie: mercureAuthorization=*JWT_token*;path=*mercure_path*
Then, I store JWT_token in a String variable, String tokenForPrivateSub for exemple (using a some split() methods).
Once I'm done with that I pass the token in the constructor of my Mercure class :
Mercure mercure = Mercure(hub_url: hub_url, token: tokenForPrivateSub);
This might be not an issue but also there is nothing i can find in readme.
Thanks