Log In

The user is the starting point of the model. You'll need to call Login to get the logged in user.

// Login returns the user fact and profile information
var (user, profile) = await jinagaClient.Login();

In your Notebook, you can call the jinagaClient.RenderFacts method (without a semicolon) to output a graph of facts. Give that a try with the user.

// Call RenderFacts on the Jinaga client to display the facts
jinagaClient.RenderFacts(user)

This will produce the following graph:

%0 eLG0D2gojV+51Ix80JNo2Uh4EQTKvjbZUq5JNrf9K5gSXEqRmi7LBSleOl09F/bWdrlWUgDkalEH847v83U7fA== Jinaga.User publicKey --- FAKE USER ---

When you are modeling, you are using the JinagaTest client factory, which is intended for unit tests. This factory lets you specify a user to simulate being logged in. That is the user fact that is returned to you.

In a real application, the User fact will represent an authenticated user. The means of authentication is based on your configuration. For example, for a MAUI application, you might authenticate with the user's Apple ID or Google ID. That will produce a User that is unique to them. Authorization and distribution rules govern which users are allowed to write and read which facts.

Continue With

Save Facts

Jinaga is a product of Jinaga LLC.

Michael L Perry, President