Skip to content

Authentication state

A Privy user’s authentication state is defined by the AuthState enum below.

csharp
public enum AuthState
{
    NotReady, // Privy has not yet finished initializing
    Unauthenticated, // User is unauthenticated
    Authenticated // User is authenticated
}

You can retrieve the user’s AuthState at any time via:

csharp
 Debug.Log(PrivyManager.Instance.AuthState);

You can also subscribe to AuthState updates via:

csharp
PrivyManager.Instance.SetAuthStateChangeCallback(state =>
{
    // User's AuthState has updated
    Debug.Log(state);
});