This module provides shortcut routes for accessing glimpse functionality and user authentication.
/login
- User-specific login redirect with auto-registration/thanks
- New user welcome page/:id
- Get page data by ID (equivalent to /views/glimpse/:id
)authCheck
middleware/views/glimpse/:id
routeProvides personalized redirect functionality for authenticated users with automatic user registration.
GLANCE_DEMOS_DB_ID
database for user's record/thanks
The GLANCE_DEMOS_DB_ID
database must contain:
URL
, Link
, Redirect URL
, Demo URL
, url
, link
url
, rich_text
, title
GLANCE_DEMOS_DB_ID
- Required Notion database ID for user lookupWelcome page for newly registered users explaining next steps.
/login
after user creationid
(string, required) - The Notion page ID to retrieveReturns JSON response with page data from Notion API, with button properties filtered out.
When serving the React frontend, initial data is injected into the HTML to avoid loading states. To prevent HTML content from Notion pages (like <script>
tags or other HTML elements) from breaking the JavaScript bootstrapping process, all <
characters in the JSON data are escaped using Unicode escape sequences (\u003c
). This ensures that any HTML tags in Notion content are safely rendered as text rather than executed as HTML.
This module provides multiple access patterns:
/glimpse/login
- Personalized user redirect with automatic signup/glimpse/thanks
- New user onboarding/glimpse/{page-id}
- Shortcut to /views/glimpse/{page-id}
The login route transforms the user experience from "access denied" to "welcome, you're registered" for new users.