oauthAccessTokens holds the bearer tokens that web accepts. In Ayakaleaf Pro these are the personal access tokens (Git authentication tokens) that a user creates on the account settings page and uses for git-bridge and the MCP endpoint. One document is one token. The schema is services/web/app/src/models/OauthAccessToken.mjs; the oauth2-server web module writes the collection, mostly with the native driver.
Fields
Who Writes It
Who Reads It
Indexes
Migrations are in
tools/migrations/. The unique accessToken_1 index comes only from migrations tagged saas and server-pro, so in Community Edition there is no index on accessToken.
Notes
- Deleting a user does not delete their tokens.
UserDeleterfires the hookcleanupPersonalAccessTokens(services/web/app/src/Features/User/UserDeleter.mjs:230-234), but no module listens to it. Both token checks reject the tokens because the user is gone, and the TTL index removes them a day afteraccessTokenExpiresAt. - Suspending a user ends the sessions only; the tokens stay, and both token checks reject them while
users.suspendedistrue(OAuth2Model.mjs:51-54,OAuthPersonalAccessTokenManager.mjs:129-134).

