Skip to content

BUG - useLocalSessionId does not update after leaving the room then calling daily.preAuth #9

@ssimonitch

Description

@ssimonitch

Expected behavior

After calling daily.preAuth I see that the useLocalSessionId hook correctly returns the session ID of the local user. I can then call daily.join() to the join the room with that session ID, and then call daily.leave() to leave the room with that session ID.

At this point the useLocalSessionId hook returns undefined, and I expect that calling preAuth again will issue a new local session ID that can be accessed by the useLocalSessionId hook.

Describe the bug (unexpected behavior)

In the above scenario, if I call preAuth again after leaving the room I see a participant-updated event fire with a new session ID for the local user but the return value of useLocalSessionId as well as useLocalParticipant remains undefined. I would expect those values to reflect the new local session ID, unless I am misunderstanding how this works?

Steps to reproduce

  1. Call daily.preAuth() passing in url and token as options
  2. Notice participant-updated event fires with new session ID, which is correctly returned by useLocalSessionId and useLocalParticipant hooks
  3. Call daily.join() to join room
  4. Call daily.leave() to leave room
  5. Call daily.preAuth again, passing in same url and token options
  6. Notice participant-updated event fires with new session ID, however useLocalSessionId and useLocalParticipant hooks returns undefined

Additional context

Room I am testing in:
https://tastemade-staging.daily.co/zPmtkqdArvkU4a53DdzC

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions