Designer API
Control the Webflow Designer
page.isPasswordProtected()
Check if the page is password protected.
1page.isPasswordProtected(): Promise<boolean>
Promise<boolean>
boolean
A promise that resolves to a boolean value indicating whether the page is password protected.
1// Get Current Page2const currentPage = await webflow.getCurrentPage() as Page34// Check if current page is the homepage5const isPasswordProtected = await currentPage.isPasswordProtected()67if (isPasswordProtected) {8 console.log('Current page is PasswordProtected')9} else {10 console.log('Current page is not PasswordProtected')11}
Try this example