Skip to content

Commit d17c90a

Browse files
attempt 2
1 parent e0976e4 commit d17c90a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/web/src/auth.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ export const providerMap = providers
4747
.filter((provider) => provider.id !== "credentials");
4848

4949

50-
const useSecureCookies = AUTH_URL.startsWith("https://");
51-
const hostName = new URL(AUTH_URL).hostname;
50+
const useSecureCookies = AUTH_URL?.startsWith("https://") ?? false;
51+
const hostName = AUTH_URL ? new URL(AUTH_URL).hostname : "localhost";
5252

5353
export const { handlers, signIn, signOut, auth } = NextAuth({
5454
secret: AUTH_SECRET,

packages/web/src/lib/environment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ export const AUTH_GITHUB_CLIENT_ID = getEnv(process.env.AUTH_GITHUB_CLIENT_ID);
1212
export const AUTH_GITHUB_CLIENT_SECRET = getEnv(process.env.AUTH_GITHUB_CLIENT_SECRET);
1313
export const AUTH_GOOGLE_CLIENT_ID = getEnv(process.env.AUTH_GOOGLE_CLIENT_ID);
1414
export const AUTH_GOOGLE_CLIENT_SECRET = getEnv(process.env.AUTH_GOOGLE_CLIENT_SECRET);
15-
export const AUTH_URL = getEnv(process.env.AUTH_URL, "")!;
15+
export const AUTH_URL = getEnv(process.env.AUTH_URL);

0 commit comments

Comments
 (0)