Skip to main content
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. UserDeleter fires the hook cleanupPersonalAccessTokens (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 after accessTokenExpiresAt.
  • Suspending a user ends the sessions only; the tokens stay, and both token checks reject them while users.suspended is true (OAuth2Model.mjs:51-54, OAuthPersonalAccessTokenManager.mjs:129-134).
Last modified on November 14, 2026