Skip to content

Commit

Permalink
feat: add support for redirect proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
timia2109 committed Aug 7, 2024
1 parent 8f62f2d commit 34dd79f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/auth.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { NextAuthConfig } from "next-auth";
import { Provider } from "next-auth/providers";
import type { Provider } from "next-auth/providers";
import Facebook from "next-auth/providers/facebook";
import Google from "next-auth/providers/google";
import { env } from "./env/server.mjs";
Expand Down Expand Up @@ -28,6 +28,7 @@ if (env.AUTH_FACEBOOK_ID && env.AUTH_FACEBOOK_SECRET) {

export const authConfig: NextAuthConfig = {
secret: env.NEXTAUTH_SECRET,
redirectProxyUrl: env.REDIRECT_PROXY_URL,
session: {
maxAge: env.SESSION_VALIDITY_IN_SECONDS,
strategy: "jwt",
Expand Down
4 changes: 4 additions & 0 deletions src/env/schema.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ export const serverSchema = z.object({
.optional()
.describe("The root URL of the server. Used to generate invitation links"),
ALLOW_ACCOUNT_LINKING: z.enum(["true", "false"]).default("false"),
REDIRECT_PROXY_URL: z
.string()
.optional()
.describe("The URL to the redirect proxy"),

// auth-js Providers
AUTH_GOOGLE_ID: z.string().optional(),
Expand Down

0 comments on commit 34dd79f

Please sign in to comment.