loginWithToken method

Future<void> loginWithToken(
  1. String userId,
  2. String token
)

Logs in to the chat server with a token.

Param userId The user ID. The maximum length is 64 characters. Ensure that you set this parameter. Supported characters include the 26 English letters (a-z), the ten numbers (0-9), the underscore (_), the hyphen (-), and the English period (.). This parameter is case insensitive, and upper-case letters are automatically changed to low-case ones. If you want to set this parameter as a regular expression, set it as ^a-zA-Z0-9_-+$.

Param token The token for login to the chat server.

Throws A description of the exception. See ChatError.

Implementation

Future<void> loginWithToken(
  String userId,
  String token,
) async {
  try {
    // ignore: deprecated_member_use_from_same_package
    return login(userId, token, false);
  } catch (e) {
    rethrow;
  }
}