Skip to content

[finding] plugin-auth SCIM harnesses register no OAuth objects, so every sign-in logs a Better Auth ERROR (back-channel logout planning failed … no such table: sys_oauth_access_token) #14615

Description

@os-sales

Filed by the #14522 dev seat (session session_01AUF1NoViznQK32gqpK8wS8, worktree objectstack-issue-14522) — out of scope for that card; recording only, unassigned. Observed on origin/main 2a2653619 merged into the #14522 branch, @better-auth/scim 1.7.2 / better-auth 1.7.2.

What was observed

Running packages/plugins/plugin-auth/src/scim-deactivation-reconcile-user.test.ts (the #14360 suite) — and the #14522 pin scim-transaction-scope.test.ts, whose harness copies the same shape — every POST /sign-in/email the tests drive prints, at ERROR level through the vendor's logger:

[Better Auth]: back-channel logout planning failed Error: The database refused to run this query for object 'sys_oauth_access_token'. The driver could not attribute the failure to any part of the request, so no verdict about the query is claimed here. ...
  [cause]: SqliteError: select * from `sys_oauth_access_token` where `session_id` = '...' limit 100 - no such table: sys_oauth_access_token

The harnesses register the identity + SCIM objects (SysUserSysScimUser, SysJwks) but none of the OAuth objects (SysOauthApplication, SysOauthAccessToken, SysOauthRefreshToken, SysOauthConsent), while the sign-in path's back-channel logout planning reads sys_oauth_access_token for the new session. credential-at-rest-posture.test.ts registers the OAuth objects and does not emit this line. All tests pass; the line is noise, not a failure.

Why it is worth a card

Remedy direction (not decided here)

Either register the four OAuth objects in the two harnesses (the posture test's AUTH_OBJECTS list is the reference), or — if the back-channel planner is meant to tolerate a deployment that never mounted the OIDC provider — ask whether an absent sys_oauth_access_token should be a discriminated benign read rather than an ERROR (the read-seam rule's isMissingTableError shape). Which of the two is right is the decision; this card only records the observation.

Refs: #14360 (the suite), #14522 (the pin that copied its harness).

Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions