Expand my Community achievements bar.

How long is my auth token valid?

Avatar

Level 4

In php when I call $session->getAuthenticationToken, I get an authentication token returned to me.   How long is that auth token valid for?

I ask because I was reading the docs on webcamPublisher and under connectSession it says: "re-sessioning of components is not supported.".  So if my session expires and I want to connect again then in addition to creating a new session I also need to destroy my old webcamPublisher and create a new one.   Am I understanding that correctly?

Thank you,
Eric

3 Replies

Avatar

Employee

Your external authentication token is valid for the duration of a room  session (i.e. from room start to room end).

If you room restart because of a failure (server fails and your room bounces to a different server) that's not considered a new session and the authentication tokens remain valid.

Avatar

Level 3

Does a room session end when all users have exited the room?

Is it possible to create tokens that would be valid for a specified period of time?

Avatar

Employee

A room session ends a few minutes after all users have left.

Currently there is no way to make the duration of a token, but you can invalidate the session by calling AccountManager.invalidateSession(session).

Note that invalidating the session doesn't stop users that are already in a room, only users entering or re-entering the room.

I think we should really provide a "stop room" method, that kicks all users out of the room and invalidate the session. It's in our todo list but not too hight in priority right now.