Legacy Dev Forum Posts

 View Only

Sign Up

Ending a notification topic on the token becoming invalid. Never receive message on v2.system.token_revoked.{id} topic

  • 1.  Ending a notification topic on the token becoming invalid. Never receive message on v2.system.token_revoked.{id} topic

    Posted 06-05-2025 18:18

    Darren_West | 2020-09-29 15:46:55 UTC | #1

    Hi,

    We are currently watching a number of topics on a single subscription. When the token becomes invalid the web socket does not close. I am trying to implement this logic at the moment. I have seen that there is a v2.users.{id}.tokens topic that pushes a message when a new token is created and when a token becomes invalid.

    Unfortunately I cannot work out what hash is being used in the tokenHash field to compare against the token I am currently using. Is this the correct way to achieve this and if so can you tell me how you are hashing the token?

    Regards, Darren


    john | 2020-09-30 20:16:33 UTC | #2

    The token hash is a base64 encoded sha256 hash of the access token issued to the client.


    Darren_West | 2020-10-01 10:17:27 UTC | #3

    Great thanks!

    I was reading about v2.system.token_revoked.{id} I have noticed that I never get a message for this even if I revoke the token. I am not subscribing to it manually because I read it is implicitly subscribed too.

    I have tried subscribing to it manually but cannot figure out what ID it is expecting. I tried with the channel ID but got a 400 response.

    Thanks in advance, Darren


    system | 2020-11-01 10:17:29 UTC | #4

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 8933