Skip to navigation

Call Login after Initialize succeeds. Choose the method that matches the access type you created in the dashboard. A username login requires both username and password. Device login sends the configured system ID as sid. The Windows SDK defaults use the current Windows account SID; they do not read a motherboard or processor ID. See Use device login without a login page to find the ID, add it to the dashboard and configure a custom platform ID.

Each code tab lists three choices for reference. Use only one of them in your sign-in flow. Calling all three in order would attempt three sign-ins, not show three ways the same login works.

SDK version: V3 Beta. These examples use the current downloads. V1 and V2 use different APIs; choose them in the version selector.

Each example assumes app is the AuthlyX client you created in Connect your app. When a method takes a callback, AuthlyX calls it after the reply arrives. A name such as result inside that callback is created there; you do not declare it at the top of your file. For C++ futures, Python or JavaScript await, Java futures, Go errors and Rust ?, read Results.

app.login("YOUR_LICENSE_KEY", result =>
{
if (result.ok)
Console.WriteLine("Signed in");
else
Console.WriteLine(result.message);
});
app.login("YOUR_USERNAME", "YOUR_PASSWORD", result =>
{
if (result.ok)
Console.WriteLine("Signed in");
else
Console.WriteLine(result.message);
});
app.deviceLogin(result =>
{
if (result.ok)
Console.WriteLine("Signed in");
else
Console.WriteLine(result.message);
});

The three calls are alternatives. Do not run all of them for one sign-in flow. Each successful login creates a session bound to the identity that signed in. See User Data for the current identity and Heartbeats for continued session checks.