Skip to content

Commit dcf5611

Browse files
authored
chore: fix websocket example deployment (#6176)
1 parent d1a7d0f commit dcf5611

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"@trpc/server": "npm:@trpc/server@next",
4848
"clsx": "^2.0.0",
4949
"next": "^15.0.2",
50-
"next-auth": "npm:next-auth@4.22.1",
50+
"next-auth": "npm:next-auth@^4.24.10",
5151
"react": "^18.3.1",
5252
"react-dom": "^18.3.1",
5353
"superjson": "^1.12.4",

src/pages/api/auth/[...nextauth].ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ import type { AppProviders } from 'next-auth/providers';
33
import CredentialsProvider from 'next-auth/providers/credentials';
44
import GithubProvider from 'next-auth/providers/github';
55

6-
let useMockProvider = process.env.NODE_ENV === 'test';
6+
let useMockProvider =
7+
process.env.NODE_ENV === 'test' ||
8+
process.env.RAILWAY_ENVIRONMENT_NAME?.includes('-pr-'); // example: 'trpc-pr-5821'
9+
710
const { GITHUB_CLIENT_ID, GITHUB_SECRET, NODE_ENV, APP_ENV } = process.env;
811
if (
912
(NODE_ENV !== 'production' || APP_ENV === 'test') &&

0 commit comments

Comments
 (0)