Skip to main content

v0.3.2

Changed​

  • API keys — corrected the public API (the feature shipped in v0.3.1). Self-service methods now take identity from the auth context, admin methods take a user sub, every method uses request/response DTOs with runtime validation, and generated keys are a plain server-generated secret (no prefix). See the API Keys guide.

If you started using API keys in v0.3.1:

  • Self-service: drop the userId argument — identity comes from the session.

    await apiKeys.createKey(dto); // was: createKey({ userId, ...dto })
  • Admin: use the admin* methods on ApiKeyService (keyed by sub):

    await apiKeys.adminCreateKey({ sub, expiresInDays: 90 });
  • Remove apiKeys.keyPrefix from config. The nauth_api_keys schema change ships as an automatic follow-up migration — no manual step.