Check compare with Centrifugo 4
Closed this issue · 2 comments
Opekunov commented
Check compare with Centrifugo 4
FZambia commented
I was just reported an issue with private channel token generation. In v4 client
claim is only used for backwards compatibility, instead sub
claim with user ID must be part of subscription token. Details: https://centrifugal.dev/docs/getting-started/migration_v4#subscription-token-migration
I think the signature (and name) of generatePrivateChannelToken
should be changed to sth like:
generateSubscriptionToken(string $userId, string $channel, $exp = 0, array $info = []): string
Or maybe:
generateSubscriptionToken(string $channel, string $userId = '', $exp = 0, array $info = []): string
Hard to say which one is better.
Opekunov commented
Thx! Try this later 🙌