Skip to main content

What Problem Does This Solve?

LCK includes default UI (tablets) for user login and streaming setup, but you might want to build your own custom interface that matches your game’s style. You need a way to check if users are logged in, subscribed, and have configured streaming—without using the default tablet UI. ILckCore provides the core authentication and configuration APIs so you can build custom login flows and subscription gates.

When to Use This

Use ILckCore when:
  • Building a custom login UI instead of using LCK tablets
  • Implementing subscription-gated features
  • Checking if streaming is configured before showing recording options
  • Creating a branded authentication experience
Don’t use this if: You’re happy with the default tablet UI—just use that instead.

Quick Example


How It Works

Login Flow

  1. Start login → Get a short code (e.g., “ABC123”)
  2. Display code → User enters it on a website
  3. Poll for completion → Check if login succeeded
  4. Handle result → Proceed with authenticated features

Common Patterns

Complete custom login flow

Subscription gate for premium features

Check streaming configuration before enabling streaming

Conditional feature availability


Dependency Injection

ILckCore is injected using the [InjectLck] attribute:
Make sure LCK is properly initialized before using injected services. Call LckCore.Initialize() first.

API Reference

StartLoginAttemptAsync()

Initiates the login process and returns a short code for the user to enter on the login website.
Returns: Result<string> containing the login code (e.g., “ABC123”) Example:

CheckLoginCompletedAsync()

Checks whether the user has completed the login process on the website.
Returns: Result<bool>true if login completed, false if still pending Example:
Usage pattern: Poll this method every 1-2 seconds after starting login.

IsUserSubscribed()

Checks if the logged-in user has an active subscription.
Returns: Result<bool>true if user has active subscription Example:

HasUserConfiguredStreaming()

Checks if the user has configured their streaming setup (platforms, keys, etc.).
Returns: Result<bool>true if streaming is configured Example:

Login Flow Best Practices

Display code clearly — Use large, readable font for login code
Show instructions — Tell users where to enter the code (liv.tv/login)
Poll every 2 seconds — Balance responsiveness vs. server load
Set timeout — Don’t poll forever (60-120 seconds reasonable)
Handle errors — Network issues, expired codes, etc.

Good polling pattern


Error Handling

All methods return Result<T> which can contain CoreError:

Custom Implementation Warning

Do not implement your own ILckCore. This interface is for consuming core services, not creating custom implementations. Use the provided implementation via dependency injection.
The LCK SDK provides the implementation—you just inject and use it.

Testing Without Real Login

For testing purposes, you can mock the interface:

  • CoreError — Error codes returned by core methods
  • LckCore — Core initialization and setup