> ## Documentation Index
> Fetch the complete documentation index at: https://docs.susaplay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Identity

> Reading the current player and handling guest sessions

Identity is resolved by the SusaPlay shell before your game starts. There is no login flow to
build and no identity call to make — by the time `Initialize()` returns, the player is known.

## Reading the current player

```csharp theme={null}
await SusaPlaySDK.Initialize();

string uid = SusaPlaySDK.Auth.Uid;
string name = SusaPlaySDK.Auth.DisplayName;
```

| Property          | Type     | Notes                                             |
| ----------------- | -------- | ------------------------------------------------- |
| `Uid`             | `string` | Platform player id. Stable for signed-in players. |
| `DisplayName`     | `string` | May be empty for guests.                          |
| `IsGuest`         | `bool`   | True when the player has not signed in.           |
| `IsAuthenticated` | `bool`   | True when the player has an account.              |

All four are null or false before `Initialize()` completes.

## Guest sessions

Players can start without an account. The shell issues a guest session automatically.

```csharp theme={null}
if (SusaPlaySDK.Auth.IsGuest)
{
    // Offer a "sign in to keep your progress" prompt at a natural break —
    // guest progress is tied to the browser and can be lost.
}
```

Guests can use the wallet, saves, and analytics exactly like signed-in players.

## Account merge

When a guest signs in, the platform links their existing progress to the new account. This is
handled entirely by the shell — your game does not orchestrate it and does not need to migrate
anything.

`Uid` can change across sessions for a guest who later signs in. Never persist a uid in your own
backend as a permanent key without also handling that transition.

## Authentication tokens

The SDK attaches the player's auth token to every platform request for you. There is no
`getIdToken` in the Unity SDK, and a game should not need one.

If your game calls **your own** backend, use `SusaPlaySDK.Api` — it signs those requests with the
player's identity so your server can verify who is calling:

```csharp theme={null}
var result = await SusaPlaySDK.Api.Get("/my-endpoint");
```

<Warning>
  Never trust a player id sent from the client. Verify it server-side on every request that grants
  anything.
</Warning>
