Skip to content

Commit 54cb363

Browse files
committed
fixes
1 parent 773ad29 commit 54cb363

File tree

5 files changed

+9
-74
lines changed

5 files changed

+9
-74
lines changed

src/index.public.spec.ts

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,6 @@ import { userManagement, sso, webhooks, actions } from './index.public';
22

33
describe('Public Exports', () => {
44
describe('userManagement exports', () => {
5-
it('should expose getAuthorizationUrl', () => {
6-
expect(userManagement.getAuthorizationUrl).toBeDefined();
7-
expect(typeof userManagement.getAuthorizationUrl).toBe('function');
8-
});
9-
10-
it('should expose getLogoutUrl', () => {
11-
expect(userManagement.getLogoutUrl).toBeDefined();
12-
expect(typeof userManagement.getLogoutUrl).toBe('function');
13-
});
14-
15-
it('should expose getJwksUrl', () => {
16-
expect(userManagement.getJwksUrl).toBeDefined();
17-
expect(typeof userManagement.getJwksUrl).toBe('function');
18-
});
19-
205
it('should generate authorization URLs correctly', () => {
216
const url = userManagement.getAuthorizationUrl({
227
clientId: 'client_123',
@@ -25,7 +10,9 @@ describe('Public Exports', () => {
2510
});
2611

2712
expect(url).toContain('client_id=client_123');
28-
expect(url).toContain('redirect_uri=https%3A%2F%2Fexample.com%2Fcallback');
13+
expect(url).toContain(
14+
'redirect_uri=https%3A%2F%2Fexample.com%2Fcallback',
15+
);
2916
expect(url).toContain('provider=authkit');
3017
});
3118

@@ -46,11 +33,6 @@ describe('Public Exports', () => {
4633
});
4734

4835
describe('sso exports', () => {
49-
it('should expose getAuthorizationUrl', () => {
50-
expect(sso.getAuthorizationUrl).toBeDefined();
51-
expect(typeof sso.getAuthorizationUrl).toBe('function');
52-
});
53-
5436
it('should generate SSO authorization URLs correctly', () => {
5537
const url = sso.getAuthorizationUrl({
5638
clientId: 'client_123',
@@ -80,4 +62,5 @@ describe('Public Exports', () => {
8062
expect(actions.constructAction).toBeDefined();
8163
});
8264
});
83-
});
65+
});
66+

src/index.public.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@ export type {
2525
export type { SSOAuthorizationURLOptions } from './public/sso';
2626

2727
// Note: If you need authenticateWithCodeAndVerifier, use the full WorkOS SDK
28-
// as it requires server-side API key authentication
28+
// as it requires server-side API key authentication
29+

src/public-exports.spec.ts

Lines changed: 0 additions & 49 deletions
This file was deleted.

src/public/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Public methods that can be safely used in without an API key.
2+
* Public methods that can be safely used without an API key.
33
*/
44

55
// User Management public methods and types

src/public/user-management.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export function getJwksUrl(
140140
baseURL = 'https://api.workos.com',
141141
): string {
142142
if (!clientId) {
143-
throw TypeError('clientId must be a valid clientId');
143+
throw new TypeError('clientId must be a valid clientId');
144144
}
145145

146146
return `${baseURL}/sso/jwks/${clientId}`;

0 commit comments

Comments
 (0)