Hi,
I'm using the recent php sdk to create a room and generate auth tokens.
Every time the user tries to login we run the following php code:
try {
$rtc->createRoom($room, $template, true);
$collection = 'UserManager';
$rtc->subscribeCollection($room, $collection);
} catch (Exception $e) {
// room already exists?
log($e);
}
$session = $rtc->getSession($room);
$token = $session->getAuthenticationToken($secret, $userName, $userId, $userRole);
Transient room which prevents duplicate IDs:
- A user can always login at the first time.
- If the user logs out, waits more than 5 minutes and tries to login again, he always succeeds.
- If the user logs out with cSession.logout() and tries to login again after less than 5 minutes it always fails.
I'm getting the login event and the logout event immediately after that, both in the flash client and from the LCCS server2server hooks.
In the php try/catch block I'm getting: exception 'RTCError' with message '403' in lccs.php:889
- If the user tries to login again after less than 5 minutes he always succeeds.
- I've tried to see if the room exists or not with the room console and $lccs->getRoomInfo($room) but I can't see a consistent behaviour.
Sometimes the room is destroyed and sometimes not but the user still can't login after less than 5 minutes.
Non-transient room which allows duplicate IDs:
- When a user logs out, the room sometimes disappears even though it is supposed to be a non-transient room.
- The user is getting the login and right after that the logout event if trying to login again less than 5 minutes after the previous logout.
Any idea what could be wrong?
Thanks