Skip to content

Commit

Permalink
fix(backend,clerk-sdk-node): Resolve reported signature issues (#2284)
Browse files Browse the repository at this point in the history
* fix(backend): Add `createdAt` param in User#createUser request

Resolves #2281

* fix(clerk-sdk-node): Fix `verifyToken()` signature to support a signle token param

Resolves #2280

* chore(repo): Add changeset
  • Loading branch information
dimkl authored Dec 7, 2023
1 parent 8eb02b8 commit 7af0949
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .changeset/little-dolphins-scream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@clerk/clerk-sdk-node': minor
'@clerk/backend': minor
---

Add missing `createdAt` param in `User#createUser()` of `@clerk/backend`.
Fix `clerkClient.verifyToken()` signature to support a single `token: string` parameter.
1 change: 1 addition & 0 deletions packages/backend/src/api/endpoints/UserApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ type CreateUserParams = {
skipPasswordRequirement?: boolean;
totpSecret?: string;
backupCodes?: string[];
createdAt?: Date;
} & UserMetadataParams &
(UserPasswordHashingParams | object);

Expand Down
2 changes: 1 addition & 1 deletion packages/sdk-node/src/clerkClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { loadApiEnv, loadClientEnv } from './utils';
type ExtendedClerk = ReturnType<typeof _Clerk> & {
expressWithAuth: ReturnType<typeof createClerkExpressWithAuth>;
expressRequireAuth: ReturnType<typeof createClerkExpressRequireAuth>;
verifyToken: typeof _verifyToken;
verifyToken: (token: string, verifyOpts?: Parameters<typeof _verifyToken>[1]) => ReturnType<typeof _verifyToken>;
};

/**
Expand Down

0 comments on commit 7af0949

Please sign in to comment.