Skip to content

Mark client credentials tokens on the resource server user and verify the ephemeral token at registration #260

Closed

Description

@Bccorb

Problem

  • packages/core/src/resourceServer.ts returns client credentials tokens (sub equal to client_id) as a ResourceServerUser with id set to the client id and nothing marking it as a machine token, so adopters can treat it as a user id
  • packages/core/src/handlers/register.ts signs the ephemeral token into the registration cookie without verifyUpstreamSession(..., "ephemeral"), unlike the login handler and the manifest path

Fix

  • add isClient to the resource server user, and a guard option that requires a user
  • verify the ephemeral token in registerHandler before signing the cookie

Activity

  1. added
    bugSomething isn't working
    P3Later
    v0.22Targets the v0.22 release
    v0.23Release v0.23: roles, permissions and hooks
    and removed
    v0.22Targets the v0.22 release
    on Nov 1, 2026
  2. added this to the v0.23 milestone on Nov 2, 2026
  3. Bccorb commented on Nov 7, 2026

    @Bccorb
    ContributorAuthor

    Done on main. packages/core/src/resourceServer.ts marks client credentials tokens with isClient, and the guards refuse them unless allowClients is set (the Go, Python and Rust adapters match, fells-code/seamless-auth-go#32, fells-code/seamless-auth-python#35, fells-code/seamless-auth-rust#37). registerHandler verifies the ephemeral token with verifyUpstreamSession before signing the registration cookie. Landed in #270.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3LaterbugSomething isn't workingv0.23Release v0.23: roles, permissions and hooks

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions