-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(examples): updates auth example to latest (#10090)
The auth example was still on `v3.0.0-beta.24`, was missing its users collection config, and was not yet using the component paths pattern established here: #7246. This updates to latest and fixes these issues. This example can still use further improvements and housekeeping which will come in future PRs.
- Loading branch information
1 parent
dd3c2eb
commit 7292220
Showing
20 changed files
with
5,092 additions
and
6,761 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
# NOTE: Change port of `PAYLOAD_PUBLIC_SITE_URL` if front-end is running on another server | ||
PAYLOAD_PUBLIC_SITE_URL=http://localhost:3000 | ||
PAYLOAD_PUBLIC_SERVER_URL=http://localhost:3000 | ||
# Database connection string | ||
DATABASE_URI=mongodb://127.0.0.1/payload-draft-preview-example | ||
|
||
# Used to encrypt JWT tokens | ||
PAYLOAD_SECRET=YOUR_SECRET_HERE | ||
|
||
# Used to configure CORS, format links and more. No trailing slash | ||
NEXT_PUBLIC_SERVER_URL=http://localhost:3000 | ||
DATABASE_URI=mongodb://127.0.0.1/payload-example-auth | ||
PAYLOAD_SECRET=PAYLOAD_AUTH_EXAMPLE_SECRET_KEY | ||
|
||
# Used to share cookies across subdomains | ||
COOKIE_DOMAIN=localhost |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,15 +1,4 @@ | ||
module.exports = { | ||
extends: ['plugin:@next/next/core-web-vitals', '@payloadcms'], | ||
ignorePatterns: ['**/payload-types.ts'], | ||
overrides: [ | ||
{ | ||
extends: ['plugin:@typescript-eslint/disable-type-checked'], | ||
files: ['*.js', '*.cjs', '*.json', '*.md', '*.yml', '*.yaml'], | ||
}, | ||
], | ||
parserOptions: { | ||
project: ['./tsconfig.json'], | ||
tsconfigRootDir: __dirname, | ||
}, | ||
root: true, | ||
extends: ['@payloadcms'], | ||
} |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
build | ||
dist | ||
node_modules | ||
package - lock.json.env | ||
package-lock.json | ||
.env |
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,24 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/swcrc", | ||
"sourceMaps": true, | ||
"jsc": { | ||
"target": "esnext", | ||
"parser": { | ||
"syntax": "typescript", | ||
"tsx": true, | ||
"dts": true | ||
}, | ||
"transform": { | ||
"react": { | ||
"runtime": "automatic", | ||
"pragmaFrag": "React.Fragment", | ||
"throwIfNamespace": true, | ||
"development": false, | ||
"useBuiltins": true | ||
} | ||
} | ||
}, | ||
"module": { | ||
"type": "es6" | ||
} | ||
} |
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
Oops, something went wrong.