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
| Type | Purpose |
|---|---|
| User | A regular person using the platform |
| Client | A service or machine identity |
| System | An internal system identity |
| Guest | A temporary or external identity |
Status
Users move through a lifecycle of statuses.
| Status | Meaning |
|---|---|
| Active | Fully operational, can authenticate and access resources |
| Pending | Invited but has not completed registration |
| Suspended | Temporarily disabled, cannot authenticate |
| Inactive | Permanently 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.