Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NEXTAUTH_URL_INTERNAL option #757

Merged
merged 6 commits into from Sep 25, 2022
Merged

Add NEXTAUTH_URL_INTERNAL option #757

merged 6 commits into from Sep 25, 2022

Conversation

ghost
Copy link

@ghost ghost commented Sep 22, 2022

Fix for the private ip vs public ip problem in the dashboard.
All I had to do to fix this was change the following section in packages\dashboard\src\env\schema.mjs.

export const serverSchema = z.object({
  NEXTAUTH_SECRET: z.string(),
  NEXTAUTH_URL: z.string().url(),
  NEXTAUTH_URL_INTERNAL: z.string().url(),
  DISCORD_CLIENT_ID: z.string(),
  DISCORD_CLIENT_SECRET: z.string(),
});

With this we can now set the following environment variables in the .env file:

With the Public Domain or IP

NEXTAUTH_URL=http://domain:3000
NEXTAUTH_URL_INTERNAL=http://localhost:3000

Without the Public Domain or IP

NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_URL_INTERNAL=http://localhost:3000

A working example of this would be as follows:

NEXTAUTH_URL=http://72.222.170.15:3000
NEXTAUTH_URL_INTERNAL=http://localhost:3000

Here is the page where I found this fix at if it helps.

Nimbi added 4 commits September 21, 2022 21:51
 - Add support for both an internal and public ip host
incase user doesn't need one, so he doesn't get an error
@galnir galnir merged commit 9971232 into galnir:main Sep 25, 2022
@galnir
Copy link
Owner

galnir commented Sep 25, 2022

🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant