use session storage for client secret during onboarding (fix #14)

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-05-28 19:48:57 +02:00
parent 69a3c6ca68
commit bf6b54caa0
6 changed files with 31 additions and 27 deletions

View File

@@ -27,17 +27,11 @@ const Verify = async ({ params: { projectId } }: Props) => {
`SELECT * FROM events WHERE project_id = ${escape(projectId)} LIMIT 100`
),
]);
const clientSecret = cookies().get('onboarding_client_secret')?.value ?? null;
if (!project) {
return <div>Hmm, something fishy is going on. Please reload the page.</div>;
}
// set visible client secret from cookie
if (clientSecret && project.clients[0]) {
project.clients[0].secret = clientSecret;
}
return <OnboardingVerify project={project} events={events} />;
};