This is a Next.js project bootstrapped with create-next-app
.
This project emerged from the need for an accessible and cost-effective solution for Notion users facing limitations on free accounts or those seeking public access. Notion offers robust collaboration features but restricts access for a limited number of users or when content is made public. To overcome these constraints, this Next.js application integrates Microsoft Authentication, providing a seamless and secure way to share Notion content.
First, run the development server:
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying pages/index.js
. The page auto-updates as you edit the file.
API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.js
.
The pages/api
directory is mapped to /api/*
. Files in this directory are treated as API routes instead of React pages.
Configure authentication and authorization parameters:
- Open services/msal.js
- Replace the string "clientId" with your client ID.
- Replace the string "authority" with "https://login.microsoftonline.com/HereEnter_the_Tenant_Info_Here".
- Replace the string "redirectUri" with the redirect uri you setup on AAD Portal.
- Open lib/config.js
- Replace the string "rootNotionPageId" with your notion's page ID.