gitlabSyncUserCredentials holds one document per user who linked a GitLab account for GitLab Sync. It stores the user’s OAuth tokens, encrypted. It belongs to the gitlab-sync web module (services/web/modules/gitlab-sync). The schema is in services/web/modules/gitlab-sync/app/models/gitlabSyncUserCredentials.mjs, and all access goes through services/web/modules/gitlab-sync/app/src/TokenManager.mjs.
Fields
Who Writes It
Who Reads It
Indexes
Mongoose
autoIndex is off (services/web/app/src/infrastructure/Mongoose.mjs:7), so the schema’s unique: true on userId creates nothing. No migration creates indexes for this collection.
Notes
- Changing
GITLAB_TOKEN_CIPHER_PASSWORDmakes the stored credentials unreadable. Those users then count as not linked until they link again. - A deleted user keeps the document until the user expires.

