Pages AuthTest private access

Cloudflare Pages × Clerk

Static pages. Edge authentication.

A small demonstration of passwordless email-code sign-in for a fully statically generated Astro site.

How it works

Three steps, one protected destination.

01

Request private content

Open /private. Cloudflare middleware checks the Clerk session before it looks up the static page.

02

Verify your email

If no valid session exists, the login page uses headless ClerkJS to send and verify a one-time email code.

03

Return authenticated

Clerk activates the session and returns you to the original URL. The edge check succeeds and the private page is served.

Ready to test it?

Try the complete authentication path.

You will be returned to the private page after verifying your code.

Start the demo