Follow-up to #13714. Fully sanitizes the unauthenticated client config to exclude much of the users collection, including fields, etc. These are not required of the login flow and are now completely omitted along with other unnecessary properties. This is closely aligned with the goals of the original PR, and as an added bonus, makes the config _even smaller_ than it already was for unauthenticated users. Needs #13790. --- - To see the specific tasks where the Asana app for GitHub is being used, see below: - https://app.asana.com/0/0/1211332845301588
17 lines
323 B
TypeScript
17 lines
323 B
TypeScript
'use client'
|
|
|
|
import { useConfig } from '@payloadcms/ui'
|
|
|
|
export const BeforeDashboard = () => {
|
|
const { config } = useConfig()
|
|
|
|
return (
|
|
<p
|
|
id="authenticated-client-config"
|
|
style={{ opacity: 0, pointerEvents: 'none', position: 'absolute' }}
|
|
>
|
|
{JSON.stringify(config, null, 2)}
|
|
</p>
|
|
)
|
|
}
|