Skip to content

Commit 0c0b0fe

Browse files
docs: autoLogin codeblock was not nested under 'admin' (#12573)
Additionally changed `process.env.NEXT_PUBLIC_ENABLE_AUTOLOGIN` to `NODE_ENV` since this is a more standard practice.
1 parent bfdcb51 commit 0c0b0fe

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

docs/authentication/overview.mdx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,17 @@ import { buildConfig } from 'payload'
142142
export default buildConfig({
143143
// ...
144144
// highlight-start
145-
autoLogin:
146-
process.env.NEXT_PUBLIC_ENABLE_AUTOLOGIN === 'true'
147-
? {
148-
149-
password: 'test',
150-
prefillOnly: true,
151-
}
152-
: false,
145+
admin: {
146+
autoLogin:
147+
process.env.NODE_ENV === 'development'
148+
? {
149+
150+
password: 'test',
151+
prefillOnly: true,
152+
}
153+
: false,
154+
}
155+
153156
// highlight-end
154157
})
155158
```

0 commit comments

Comments
 (0)