Problem
A developer set the userId to 0 when generating a signaling token. They attempted to log in two users to the same channel. However, when the second user joined, the first user was kicked out of the channel.
Root Cause
In RTC, setting the userId to 0 allows Agora to automatically assign a unique UID to the user. This is acceptable behavior for RTC sessions. However, Signaling has different requirements. In Signaling, each user must have a unique userId. Using 0 as the userId when generating a signaling token means that the token is only valid for UID 0. As a result, when a second user attempts to log in with the same UID (0),
the first user will be kicked out of the channel because Agora does not allow multiple simultaneous Signaling sessions with the same UID.
Solution
To resolve this issue, developers must assign a unique UID for each user or device when generating signaling tokens. Each token should be created using that unique UID to ensure that users can log in concurrently without issues.
Reference:
https://docs.agora.io/en/signaling/reference/api?platform=web#method