Azure / Azure/azure-webpubsub

Token generation in portal

Open
#190 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
147
Forks
96
Avg merge
19h 28m
Merged PRs (30d)
87

Description

### 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](https://user-images.githubusercontent.com/1917329/123240146-57754c80-d4e0-11eb-997e-760c4b594ad0.png)
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](https://user-images.githubusercontent.com/1917329/123240536-ae7b2180-d4e0-11eb-97ac-8a13ca0de0de.png)

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

### Further technical details
nodejs
"@azure/web-pubsub": "^1.0.0-beta.2",

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by comparing tokens produced by the Azure portal client URL generator with those from WebPubSubServiceClient, focusing on the differing aud value. Reproduce both flows with a normal WebSocket client and verify that the portal-generated token can be used successfully, or establish the documented limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, nodejs, typescript
Domain
api, authentication
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.