User Profiles
Learn how user profiles work in SaaSStinger Lite, what information is stored, how profiles are managed, and how identity is maintained across multiple workspaces.
User Profiles
Every authenticated user in SaaSStinger Lite has a user profile.
A user profile represents the identity of a person using the application. It stores personal information, user preferences, and the user's currently active workspace.
Unlike projects, tasks, and other business resources, a user profile is global. It exists independently of any workspace, allowing a single user to belong to multiple workspaces while maintaining one consistent identity.
What You'll Learn
In this guide you'll learn:
- What a user profile is
- When profiles are created
- What information is stored
- Which fields users can edit
- How profiles relate to workspaces
- How account deletion works
- Best practices for extending user profiles
Overview
Every authenticated account has exactly one profile.
The relationship looks like this:
Firebase Authentication
│
▼
User Profile
│
├──────────────┐
▼ ▼
Workspace A Workspace B
The user profile stores identity.
Memberships determine which workspaces the user can access.
Why Separate Authentication from Profiles?
Firebase Authentication is responsible for identifying users.
The user profile stores application-specific information.
Keeping these concerns separate allows SaaSStinger Lite to store additional information without depending on Firebase Authentication.
For example:
- Preferred display name
- Phone number
- Timezone
- Country
- Active workspace
These values belong to the application rather than the authentication provider.
Profile Lifecycle
A profile is created automatically.
Typical lifecycle:
Register
│
▼
Verify Email
│
▼
First Login
│
▼
User Profile Created
│
▼
Workspace Created
│
▼
Dashboard
Developers never need to create user profile documents manually.
Profile Structure
A typical user document contains fields similar to the following.
{
uid: string
email: string
displayName: string
phoneNumber: string
phoneCountryCode: string
countryOfResidence: string
timezone: string
activeWorkspaceId: string
photoURL: null
createdAt: Timestamp
updatedAt: Timestamp
}
Each field serves a specific purpose.
Field Reference
uid
The unique identifier assigned by Firebase Authentication.
This value never changes.
It is used throughout the application to associate resources with a specific user.
The authenticated email address.
Email addresses cannot be changed from within SaaSStinger Lite.
Keeping email immutable simplifies identity management and prevents inconsistencies across authentication providers.
displayName
The friendly name displayed throughout the application.
Examples include:
- comments
- member lists
- activity feeds
- invitations
- audit logs
Users can update this value at any time.
phoneNumber
Stores the user's contact number.
This field is optional and editable.
phoneCountryCode
Stores the country associated with the phone number.
Keeping the country code separate improves formatting and validation.
countryOfResidence
Stores the user's country.
This information may be used by future application features and integrations.
timezone
Stores the preferred timezone.
Examples:
UTC
Europe/London
Africa/Lagos
America/New_York
Timezones help present dates and times consistently across the application.
Users can update this value from their profile settings.
activeWorkspaceId
One of the most important fields in the profile.
This value identifies the workspace currently selected by the user.
Whenever a user switches workspaces, this field is updated.
The dashboard uses this value to determine which workspace should be loaded.
photoURL
Lite intentionally does not support avatar uploads.
This field remains null.
Instead, SaaSStinger Lite displays generated placeholder avatars based on the user's name.
This keeps the project simple, avoids Firebase Storage dependencies, and remains compatible with the Firebase Spark plan.
Editable Fields
Users can update:
- Display Name
- Phone Number
- Country
- Timezone
These changes are available immediately throughout the application.
Immutable Fields
The following fields cannot be edited by users.
- UID
- Email Address
- Creation Date
These values define the user's identity and should remain stable.
Multiple Workspaces
A single user profile can belong to multiple workspaces.
The relationship is managed through the memberships collection.
User
│
├─────────────┐
▼ ▼
Membership Membership
│ │
▼ ▼
Workspace A Workspace B
This architecture provides complete separation between identity and organization membership.
Architecture Note
SaaSStinger Lite intentionally separates users from workspaces.
A user represents a person.
A workspace represents an organization.
Memberships connect the two.
Privacy
Profiles are not public.
Only members of the same workspace can view each other's profile information.
This keeps user information private while supporting team collaboration.
Account Deletion
Users can permanently delete their account.
Deleting an account performs several operations.
Firebase Authentication
The authentication account is removed.
The user can no longer sign in.
User Profile
The profile document is deleted.
Memberships
All workspace memberships associated with the user are removed.
The user immediately loses access to every workspace.
Audit Logs
Audit logs are not deleted.
Historical activity remains available to preserve the integrity of the workspace's audit history.
This ensures administrators retain an accurate record of actions that occurred before the account was removed.
Security Note
Retaining audit logs after account deletion helps preserve accountability and historical records while removing the user's ability to authenticate.
Extending User Profiles
When adding new profile fields:
- Keep authentication separate from profile data.
- Store application-specific information in the user document.
- Avoid duplicating information available from Firebase Authentication.
- Consider whether the field belongs to the user or to a workspace.
As a general rule:
Personal preferences belong in the profile.
Organization-specific settings belong in the workspace.
Best Practices
- Keep profiles lightweight.
- Store only user-specific information.
- Do not use profiles to store workspace data.
- Update
activeWorkspaceIdwhen switching workspaces. - Validate all profile updates server-side.
Common Mistakes
Storing Workspace Data in the User Profile
Projects, members, permissions, and organization settings belong to workspaces—not user profiles.
Making Email Editable
Changing email addresses introduces unnecessary complexity.
Authentication providers should remain the source of truth for user identity.
Uploading Avatars in Lite
SaaSStinger Lite intentionally uses placeholder avatars to remain lightweight and Firebase Spark compatible.
Related Articles
- Authentication
- Workspaces
- Members
- Invitations
- RBAC & Permissions
Next Steps
Now that you understand user identities, continue with Workspaces to learn how SaaSStinger Lite organizes data for secure multi-tenant applications.
Related Articles
Authentication
Learn how authentication works in SaaSStinger Lite, from sign-in to server-side authorization and protected routes.
Workspaces
Learn how workspaces provide secure multi-tenancy in SaaSStinger Lite and how data is isolated between organizations.
Members
Learn how SaaSStinger Lite manages workspace membership, user roles, and collaboration using a dedicated memberships collection.
Invitations
Learn how SaaSStinger Lite securely invites users to workspaces and converts invitations into active memberships.