azure-webpubsub icon indicating copy to clipboard operation
azure-webpubsub copied to clipboard

Token generation in portal

Open gregorybleiker opened this issue 4 years ago • 1 comments

Description

When I generate a token over the portal, it doesn't work in a normal ws client

To Reproduce

go to the azure portal and generate a token via the client URL generator. The token will have an aud of "wss": image I could not use this token in new WebSocket(...

However, if I generate a token over the WebPubSubServiceClient I get a different token (starting with aud https): image

This token can be used in new WebSocket(...

Further technical details

nodejs "@azure/web-pubsub": "^1.0.0-beta.2",

gregorybleiker avatar Jun 24 '21 09:06 gregorybleiker

How you use the token in new WebSocket(...? Why you care about aud? What error did you see when you create the WebSocket with the first token? When new WebSocket you can directly pass the generated URL new WebSocket("<Client Access URL>") .

vicancy avatar Jun 29 '21 01:06 vicancy