Skip to content

User

A user represents a person or system identity in the Samna platform. Users authenticate through OAuth providers or internal credentials and receive JWT tokens for accessing services.

User Types

TypePurpose
UserA regular person using the platform
ClientA service or machine identity
SystemAn internal system identity
GuestA temporary or external identity

Status

Users move through a lifecycle of statuses.

StatusMeaning
ActiveFully operational, can authenticate and access resources
PendingInvited but has not completed registration
SuspendedTemporarily disabled, cannot authenticate
InactivePermanently disabled, soft deleted

Identities

A user can have multiple identities linked to their account.

Internal Identity uses email and password for authentication. The password is hashed and the system tracks email verification status.

External Identity links a user to an OAuth provider like Google, Microsoft, or GitHub. Each external identity stores the provider specific external ID and metadata so that a user can sign in through multiple providers.

App User

When a user interacts with a specific application, an app user record is created. This holds application specific metadata like a custom username, profile image, and any fields defined by that app. A single user can have different app user profiles across different applications.

Relations

Users can have relationships with objects in the system. These track bookmarks, pinned items, usage history, and sharing preferences across the platform.