-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
warn for incompat nextauth url and port
- Loading branch information
1 parent
e71bedd
commit 7d26141
Showing
10 changed files
with
72 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
20 changes: 20 additions & 0 deletions
20
cli/template/extras/config/next-config/with-auth-appdir.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful | ||
* for Docker builds. | ||
*/ | ||
import { env } from "./src/env.mjs"; | ||
|
||
// Warn if local development URL doesn't match with the active port | ||
if ( | ||
process.env.NODE_ENV === "development" && | ||
!env.NEXTAUTH_URL.includes(String(env.PORT)) | ||
) { | ||
console.warn( | ||
`NEXTAUTH_URL (${env.NEXTAUTH_URL}) doesn't match with PORT (${env.PORT})` | ||
); | ||
} | ||
|
||
/** @type {import("next").NextConfig} */ | ||
const config = {}; | ||
|
||
export default config; |
32 changes: 32 additions & 0 deletions
32
cli/template/extras/config/next-config/with-auth-pagedir.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/** | ||
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful | ||
* for Docker builds. | ||
*/ | ||
import { env } from "./src/env.mjs"; | ||
|
||
// Warn if local development URL doesn't match with the active port | ||
if ( | ||
process.env.NODE_ENV === "development" && | ||
!env.NEXTAUTH_URL.includes(String(env.PORT)) | ||
) { | ||
console.warn( | ||
`NEXTAUTH_URL (${env.NEXTAUTH_URL}) doesn't match with PORT (${env.PORT})` | ||
); | ||
} | ||
|
||
/** @type {import("next").NextConfig} */ | ||
const config = { | ||
reactStrictMode: true, | ||
|
||
/** | ||
* If you are using `appDir` then you must comment the below `i18n` config out. | ||
* | ||
* @see https://github.com/vercel/next.js/issues/41980 | ||
*/ | ||
i18n: { | ||
locales: ["en"], | ||
defaultLocale: "en", | ||
}, | ||
}; | ||
|
||
export default config; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters