AuthCache.init constructor

AuthCache.init(
  1. CloudBaseConfig config
)

Implementation

factory AuthCache.init(CloudBaseConfig config) {
  assert(config.envId != null && config.envId!.isNotEmpty);

  final String envId = config.envId!;

  return AuthCache(
    accessTokenKey: '${envId}_${AuthConstant.ACCESS_TOKEN}',
    accessTokenExpireKey: '${envId}_${AuthConstant.ACCESS_TOKEN_EXPIRE}',
    refreshTokenKey: '${envId}_${AuthConstant.REFRESH_TOKEN}',
    refreshTokenExpireKey: '${envId}_${AuthConstant.REFRESH_TOKEN_EXPIRE}',
    anonymousUuidKey: '${envId}_${AuthConstant.ANONYMOUS_UUID}',
    loginTypeKey: '${envId}_${AuthConstant.LOGIN_TYPE}',
  );
}