Skip to content

Commit 6a39d1c

Browse files
authored
Use typed AuthConfig in auth.config.ts (#165)
1 parent 519229d commit 6a39d1c

File tree

10 files changed

+40
-30
lines changed

10 files changed

+40
-30
lines changed

template-nextjs-authkit/convex/auth.config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import { AuthConfig } from 'convex/server';
2+
13
const clientId = process.env.WORKOS_CLIENT_ID;
24

3-
const authConfig = {
5+
export default {
46
providers: [
57
{
68
type: 'customJwt',
@@ -16,6 +18,4 @@ const authConfig = {
1618
jwks: `https://api.workos.com/sso/jwks/${clientId}`,
1719
},
1820
],
19-
};
20-
21-
export default authConfig;
21+
} satisfies AuthConfig;
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
const authConfig = {
1+
import { AuthConfig } from "convex/server";
2+
3+
export default {
24
providers: [
35
// Uncomment this once you have set up a Clerk app
46
// {
@@ -10,6 +12,4 @@ const authConfig = {
1012
// applicationID: "convex",
1113
// },
1214
],
13-
};
14-
15-
export default authConfig;
15+
} satisfies AuthConfig;
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
import { AuthConfig } from "convex/server";
2+
13
export default {
24
providers: [
35
{
4-
domain: process.env.CONVEX_SITE_URL,
6+
domain: process.env.CONVEX_SITE_URL!,
57
applicationID: "convex",
68
},
79
],
8-
};
10+
} satisfies AuthConfig;
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
import { AuthConfig } from "convex/server";
2+
13
export default {
24
providers: [
35
{
4-
domain: process.env.CONVEX_SITE_URL,
6+
domain: process.env.CONVEX_SITE_URL!,
57
applicationID: "convex",
68
},
79
],
8-
};
10+
} satisfies AuthConfig;

template-react-vite-authkit/convex/auth.config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import { AuthConfig } from 'convex/server';
2+
13
const clientId = process.env.WORKOS_CLIENT_ID;
24

3-
const authConfig = {
5+
export default {
46
providers: [
57
{
68
type: 'customJwt',
@@ -16,6 +18,4 @@ const authConfig = {
1618
jwks: `https://api.workos.com/sso/jwks/${clientId}`,
1719
},
1820
],
19-
};
20-
21-
export default authConfig;
21+
} satisfies AuthConfig;
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
const authConfig = {
1+
import { AuthConfig } from "convex/server";
2+
3+
export default {
24
providers: [
35
// Uncomment this once you have set up a Clerk app
46
// {
@@ -10,6 +12,4 @@ const authConfig = {
1012
// applicationID: "convex",
1113
// },
1214
],
13-
};
14-
15-
export default authConfig;
15+
} satisfies AuthConfig;
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
import { AuthConfig } from "convex/server";
2+
13
export default {
24
providers: [
35
{
4-
domain: process.env.CONVEX_SITE_URL,
6+
domain: process.env.CONVEX_SITE_URL!,
57
applicationID: "convex",
68
},
79
],
8-
};
10+
} satisfies AuthConfig;
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
import { AuthConfig } from "convex/server";
2+
13
export default {
24
providers: [
35
{
4-
domain: process.env.CONVEX_SITE_URL,
6+
domain: process.env.CONVEX_SITE_URL!,
57
applicationID: "convex",
68
},
79
],
8-
};
10+
} satisfies AuthConfig;

template-tanstack-start-authkit/convex/auth.config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import type { AuthConfig } from 'convex/server';
2+
13
const clientId = process.env.WORKOS_CLIENT_ID;
24

3-
const authConfig = {
5+
export default {
46
providers: [
57
{
68
type: 'customJwt',
@@ -17,6 +19,4 @@ const authConfig = {
1719
applicationID: clientId,
1820
},
1921
],
20-
};
21-
22-
export default authConfig;
22+
} satisfies AuthConfig;
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import type { AuthConfig } from 'convex/server'
2+
13
export default {
24
providers: [
35
{
@@ -6,8 +8,8 @@ export default {
68
// and configure CLERK_JWT_ISSUER_DOMAIN on the Convex Dashboard
79
// See https://docs.convex.dev/auth/clerk#configuring-dev-and-prod-instances
810
// Should look similar to 'https://main-swine-30.clerk.accounts.dev'.
9-
domain: process.env.CLERK_JWT_ISSUER_DOMAIN,
11+
domain: process.env.CLERK_JWT_ISSUER_DOMAIN!,
1012
applicationID: 'convex',
1113
},
1214
],
13-
}
15+
} satisfies AuthConfig

0 commit comments

Comments
 (0)